Opened 3 years ago

Last modified 3 years ago

#17947 assigned defect

Target System (x86_64) can't mount /dev/sda2

Reported by: Galen Owned by: kaloz
Priority: normal Milestone: Chaos Calmer 15.05
Component: packages Version: Trunk
Keywords: Cc:


Target System (x86_64) can't mount /dev/sda2

I've tested snapshots and build firmware by myself using default config:

It stop at "Waiting for root device /dev/sda2...", I think there are some driver is not built into the linux kernel.

Test method using qemu(or burn to pc)
gunzip openwrt-x86_64-combined-ext4.img.gz
qemu-system-x86_64 -hda openwrt-x86_64-combined-ext4.img

I also tested x86, it is ok! why x86_64 is failed!

gunzip openwrt-x86-generic-combined-ext4.img.gz
qemu-system-x86_64 openwrt-x86-generic-combined-ext4.img

Attachments (2)

openwrt_x86_64_cannt_mount_sda.png (21.5 KB) - added by Galen 3 years ago.
openwrt_x86_can_mount_sda.png (13.7 KB) - added by Galen 3 years ago.
x86 target system can mount and enter console

Download all attachments as: .zip

Change History (5)

Changed 3 years ago by Galen

Changed 3 years ago by Galen

x86 target system can mount and enter console

comment:1 Changed 3 years ago by jow

  • Resolution set to worksforme
  • Status changed from new to closed

You need to pass the image file as SATA disk when using x86_64 under qemu:

qemu-system-x86_64 -nographic \
        -drive file=openwrt-x86_64-combined-ext4.img,if=none,id=mydisk \
	-device ich9-ahci,id=ahci \
	-device ide-drive,drive=mydisk,bus=ahci.0
Last edited 3 years ago by jow (previous) (diff)

comment:2 Changed 3 years ago by Galen

  • Resolution worksforme deleted
  • Status changed from closed to reopened

Hi jow,

Thank you very much, you command works for me, too, it's great!

but I burn the firmwre to a WD sata hard disk on a PC, and change BIOS to boot from it,
the phenomenon is same as "qemu-system-x86_64 -hda openwrt-x86_64-combined-ext4.img"

It is blocking at "Waiting for root device /dev/sda2..."

So, I have to find the difference between x86 and x86_64

diff -Naur  target/linux/x86_64/config-default target/linux/x86/config-3.10

and I find difference, add the two lines to target/linux/x86_64/config-default


After it, I run

make -j16
qemu-system-x86_64 -nographic -hda bin/x86_64/openwrt-x86_64-combined-ext4.img 

Now, I can enter system successfully!
Should commit the changeset to Trunk? because it can't bring up x86_64 PC.
or I have to change CMOS? and how?

Below is the git changeset:

git diff
diff --git a/target/linux/x86_64/config-default b/target/linux/x86_64/config-default
index f3aabcb..f414544 100644
--- a/target/linux/x86_64/config-default
+++ b/target/linux/x86_64/config-default
 # CONFIG_ASUS_LAPTOP is not set
 # CONFIG_ATA_SFF is not set

I saw x86 has Subtarget, but x86_64 dont' have it, why?

This is x86's menuconfig

Target System (x86)  ---> 
Subtarget (Generic)  --->
Target Profile (Generic)  --->   Have many Profile

This is x86_64's menuconfig

Target System (x86_64)  --->
Target Profile (Default)  ---> Only have one profile (Default)

comment:3 Changed 3 years ago by jow

  • Owner changed from developers to kaloz
  • Status changed from reopened to assigned

The x86-64 target has legacy drivers intentionally disabled, maybe you need to change your BIOS to AHCI mode instead of the legacy IDE emulation. Reassigning this ticket to Kaloz since he maintains the target, however I'm sure we'll not add the legacy drivers.

Add Comment

Modify Ticket

as assigned .

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.