Error passing root partition label argument?

Discussion about U-Boot and the kernel.

Error passing root partition label argument?

Postby ebbix » Fri Aug 10, 2012 2:16 pm

Hello,
I am trying to modify my UBoot configuration a bit to customize its boot process.
For example, if there is a Usb drive present, I want it to boot from it, no matter how many hard drives are present.
If there are two Sata drives present, it should boot from the first and if that fails from the second one. And if no first drive is attached, it should boot from the second one. (left one)
However, I can't get this to work. The problem is that the kernel doesn't register the drive containing the kernel image as /dev/sda if it is not the only drive.
I tried passing root=LABEL=root to the kernel (when partition containing root filesystem is labeled root of course), but that doesn't seem to do the trick, it only produces a kernel panic:
$this->bbcode_second_pass_code('', 'Uncompressing Linux... done, booting the kernel.
[ 17.621682] rtc-mv rtc-mv: internal RTC not ticking
[ 17.629977] drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
[ 27.642578] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[ 27.650915] [<c000d540>] (unwind_backtrace+0x0/0xe0) from [<c040a478>] (panic+0x74/0x1b8)
[ 27.659176] [<c040a478>] (panic+0x74/0x1b8) from [<c0586cfc>] (mount_block_root+0x234/0x284)
[ 27.667677] [<c0586cfc>] (mount_block_root+0x234/0x284) from [<c0587008>] (prepare_namespace+0x15c/0x1bc)
[ 27.677309] [<c0587008>] (prepare_namespace+0x15c/0x1bc) from [<c0586984>] (kernel_init+0x1bc/0x1fc)
[ 27.686509] [<c0586984>] (kernel_init+0x1bc/0x1fc) from [<c00095c8>] (kernel_thread_exit+0x0/0x8)')
Here are some relevant parts of my UBoot configuration:
$this->bbcode_second_pass_code('', 'sata_device=0:1
sata_root=/dev/sda1
sata_rootfstype=ext3
sata_rootdelay=10
sata_set_bootargs=setenv bootargs console=$console root=$sata_root rootdelay=$sata_rootdelay rootfstype=$sata_rootfstype $mtdparts $sata_custom_params
bootcmd=usb start; run force_rescue_bootcmd; run usb_bootcmd; usb stop; run sata_bootcmd; run rescue_bootcmd; reset
sata_boot=mw 0x800000 0 1; ext2load ide $sata_device 0x800000 /boot/uImage; if ext2load ide $sata_device 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
sata2_device=1:1
sata2_set_bootargs=setenv bootargs console=$console root=$sata2_root rootdelay=$sata_rootdelay rootfstype=$sata_rootfstype $mtdparts $sata_custom_params
sata2_boot=mw 0x800000 0 1; ext2load ide $sata2_device 0x800000 /boot/uImage; if ext2load ide $sata2_device 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
sata_bootcmd=ide reset; run sata_set_bootargs; run sata_boot; run sata2_set_bootargs; run sata2_boot
sata2_root=LABEL=root
')
Passing a label to the kernel when booting from right Sata slot is not neccessary, as this will always be /dev/sda if connected.
By the way I'm running Arch Linux ARM 3.4.7 with newest UBoot and no Initrd.

I think I just did some small mistake and hope someone could help me get it sorted out. If Sata works, it won't be a challenge for me to fix Usb boot, too.
Thanks in advance for any help.
ebbix
 
Posts: 48
Joined: Fri Aug 10, 2012 1:55 pm

Re: Error passing root partition label argument?

Postby WarheadsSE » Fri Aug 10, 2012 2:18 pm

A booting with a rootfs=LABEL label like that requires an uInitrd so that by-label is capable of being used.

I think PARTUUID might work though. search.php?keywords=PARTUUID
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Error passing root partition label argument?

Postby ebbix » Fri Aug 10, 2012 2:32 pm

Thanks for the very quick reply.
Okay, that explains why it didn't work :lol:
But PARTUUID isn't an option for me as I want my goflex to boot from any partition, not the one and only with a special UUID.
So my only chance is to create a uInitrd or to give up my idea of an idiot-proof bootchain. I think I'll stick to the second option.
Thank you for your reply.
ebbix
 
Posts: 48
Joined: Fri Aug 10, 2012 1:55 pm


Return to U-Boot/Kernel

Who is online

Users browsing this forum: No registered users and 11 guests