bugGNU GRUB - Bugs: bug #42029, insmod ahci clears all detected...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #42029: insmod ahci clears all detected devices

Submitter:  benok <benok>
Submitted:  Wed 02 Apr 2014 11:57:28 AM UTC
   
 
Category:  Booting Severity:  Major
Priority:  5 - Normal Item Group:  Software Error
Status:  Invalid Privacy:  Public
Assigned to:  None Originator Name:  benok
Open/Closed:  Closed Release:  other
Release:  Reproducibility:  Every Time
Planned Release:  None

Jump to the original submission

Sat 05 Apr 2014 10:23:47 PM UTC, comment #9: 

Blinking cursor is usually because you try to load 64-bit kenel on 32-bit VM.

Vladimir Serbinenko <phcoder>
Group administrator
Sat 05 Apr 2014 10:17:40 PM UTC, comment #8: 

I tried loading kernel directly before chainloading,
grub> linux /kernel initrd=initrd.gz reason=normal
grub> initrd /initrd.gz
grub> boot
but had no success. (just halt with '_' cursor. Same as chainloading with biosnum 0x81.)
So I think chainloading might be required.

I didn't notice syslinux_configfile command.
I tried that but parse failed.
---
error output of "syslinux_configfile /syslinux.cfg"
---
error: out of memory.
error: syntax error.
error: Incorrect command.
error: syntax error.
grub> _
---
/syslinux.cfg
---
serial 0 115200 0
timeout 30
prompt 1

default Normal

label Normal
kernel kernel
append initrd=initrd.gz reason=normal

label FactoryDefault
kernel kernel
append initrd=initrd.gz reason=factory

label OSReinstall
kernel kernel
append initrd=initrd.gz reason=os_reinstall

label TechSupport
kernel kernel
append initrd=initrd.gz reason=diag

label SkipVolCheck
kernel kernel
append initrd=initrd.gz reason=skip_fsck

label MemoryTest
kernel memtest

label TestDisks
kernel kernel
append initrd=initrd.gz reason=test_disks



I didn't try simplifying syslinux.cfg, but without success of direct loading, I think it's not promising. :(

benok <benok>
Sat 05 Apr 2014 09:23:04 PM UTC, comment #7: 

Chainloading can not be used with drives not visible through BIOS. It's limitation of the concept of chainloading.
But you can load the kernel directly. You can also use the syslinux config in GRUB with syslinuxcfg command.
So just use syslinuxcfg instead of attempting to chainload.

Vladimir Serbinenko <phcoder>
Group administrator
Sat 05 Apr 2014 09:05:43 PM UTC, comment #6: 

I just tried to boot a proprietary Linux based NAS software on VMware ESXi + SATA pass through environment (which has no SATA BIOS).
I confirms it works when booting from virtual SATA environment with BIOS SATA boot support, but can't boot without SATA BIOS.

So I guess GRUB can boot with native AHCI driver.
I came close to success, but I think it's time to give up.

As I found another one while searching to get the OS to boot.
http://xpenology.com/forum/viewforum.php?f=2
I tried this and found it's greater than the OS I tried to boot.

I think I'm happy to success booting the OS, but I'll use the latter one.

Sorry posting very off-topic comment.
Thanks.

benok <benok>
Sat 05 Apr 2014 08:32:17 PM UTC, comment #5: 

Why do you try to chainload to ahci devices at all? Why not use hd* ones?

Vladimir Serbinenko <phcoder>
Group administrator
Sat 05 Apr 2014 08:29:12 PM UTC, comment #4: 

Thanks about biosnum.
I tried to set biosnum like below, but no success :-(

In reference, https://www.gnu.org/software/grub/manual/html_node/biosnum.html

>When chain-loading another boot loader (see Chain-loading),
>GRUB may need to know what BIOS drive number corresponds to
>the root device (see root) so that it can set up registers properly.


So I searched "BIOS drive number" and got pages below.

http://stackoverflow.com/questions/11174399/pc-boot-dl-register-and-drive-number

I tried following sequence where XXXX=0x80, 0x81, 128, 129, 130, 0, 1, 2, but failed to boot.
(0x81, 129 gives no error display and halt, other gives "boot error".)


grub> nativedisk
error: no device connected.
error: disk `hd0,gpt1' not found.
error: disk `hd0,gpt1' not found.
grub> ls
(ahci3) (ahci2) (ahci1) (ahci0) (ahci0,msdos1) (ata0) (ata0,gpt3)
(ata0,gpt2) (ata0,gpt1) (ata2)
grub> set root=ahci0,msdos1
grub> set biosnum=XXXX
grub> chainloader +1
grub> boot


benok <benok>
Thu 03 Apr 2014 07:34:36 PM UTC, comment #3: 

chainloading is not compatible with native disk drivers. You can manually set biosnum variable if you just want to experiment but this is not supported config and whether it works depends on machine in question.

Vladimir Serbinenko <phcoder>
Group administrator
Thu 03 Apr 2014 02:27:12 AM UTC, comment #2: 

OK, I see.

With "nativedisk" command, while I got several error messages like below, I can confirm chainload command works.
Thanks.

grub> nativedisk
error: no device connected.
error: disk `hd0,gpt1' not found.
error: disk `hd0,gpt1' not found.
grub> ls
(ahci3) (ahci2) (ahci1) (ahci0) (ahci0,msdos1) (ata0) (ata0,gpt3)
(ata0,gpt2) (ata0,gpt1) (ata2)
grub> set root=ahci0,msdos1
grub> chainloader +1
grub> boot

-> syslinux on ahci0,msdos1 starts.

p.s.
But I have chainloading problem.
syslinux says just "Boot error"...

---------------------------
Boot error
_


----------------------------

I googled and got pages below.
It seems it wouldn't exact same ploblem (my case doesn't use logical partition),
but if my understanding is correct, another BIOS(/MBR?) emulation required to workaround the problem ?

Chainloading Extlinux from Grub | SF-Xpt's Blog
http://sfxpt.wordpress.com/2014/02/17/chainloading-extlinux-from-grub/
(recent blog post.)

Is it possible to chainload EXTLINUX from GRUB? - For discussion of Syslinux and tftp-hpa - ArchiveOrange
http://web.archiveorange.com/archive/v/mwjwmvjuKo7hN5uoyVyb
(old forum discussion about chainloading)

Chainloading bootsector of logical partition with EXTLINUX installed, fails. Patch included - Grub4dos - reboot.pro
http://reboot.pro/topic/10262-chainloading-bootsector-of-logical-partition-with-extlinux-installed-fails-patch-included/

Is this already reported ?
Should I make a new ticket ?

benok <benok>
Wed 02 Apr 2014 04:02:24 PM UTC, comment #1: 

Once AHCI is loaded, BIOS disks can not be used as it would create a state conflict. "nativedisk" command is used to update root and prefix while transitionning but disappearing BIOS disks once AHCI is loaded is intentional and there is no way arround it (BIOS would hang if you try to use it on disks after AHCI is loaded due to unexpected state).

Vladimir Serbinenko <phcoder>
Group administrator
Wed 02 Apr 2014 11:57:28 AM UTC, original submission:  

"insmod ahci" clears all detected devices & fails to continue booting.

My environment is like below.

(Env1) VMware ESXi 5.1

hd0 - VMware Virtual HDD on IDE(0:0)
  hd0,gpt1 /boot <-- Latest Arch Linux & GRUB 2.02 beta2 installed
  hd0,gpt2 /
  hd0,gpt3 (boot)
ahci0 <-- Real HDD
  (ahch0,msdos1) <-- want to boot partition. (vfat&syslinux)
ahci1 <-- Real HDD1
ahci2 <-- Real HDD2
ahci3 <-- Real HDD3
fd0 <-- Virtual FDD

I booted from hd0, type c to start grub command line.
I entered commands below, but failed to boot.

grub> ls
(hd0) (hd0,gpt3) (hd0,gpt2) (hd0,gpt1) (fd0)
grub> insmod ahci
grub> ls
(ahci3) (ahci2) (ahci1) (ahci0) (ahci0,msdos1)
grub> root=(ahci0, msdos1)
grub> chainloader +1
error: disk `hd0,gpt1' not found.

After insmod ahci, booted hd0 and fd0 is gone and can't continue booting from any device. (with "error: disk `hd0,gpt1' not found")

I confirmed the issue with another Virtual env like below.

(Env2) VMware Workstation 10 (has BIOS IDE comaptible support)

hd0 - VMware Virtual HDD on IDE(0:0)
  hd0,gpt1 /boot <-- Latest Arch Linux & GRUB 2.02 beta2 installed
  hd0,gpt2 /
  hd0,gpt3 (boot)
hd1(=ahci0) - VMware Virtual HDD on SATA(0:0)
  hd1,msdos1(=ahci0,msdos1) <-- want to boot partition. (vfat&syslinux)

grub> ls
(hd0) (hd0,gpt3) (hd0,gpt2) (hd0,gpt1) (hd1) (hd1,msdos1) (fd0)
grub> insmod ahci
grub> ls
(ahci0) (ahci0, msdos1)
grub> chainloader +1
error: disk `hd0,gpt1' not found.

In both env, (Real/Virtual) SATA hard drives are fully works and have no trouble with booted Arch Linux.

benok <benok>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by phcoder (Posted a comment)
  • -email is unavailable- added by benok (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-04-02 phcoder StatusNone Invalid
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code