The holy grail of USB booting - UUIDs without a ramdisk! :D

Discussion about U-Boot and the kernel.

The holy grail of USB booting - UUIDs without a ramdisk! :D

Postby sardaukar » Fri Jul 15, 2011 12:33 am

Hello, all!

Do you have a USB hub connected to your SheevaPlug with more than one device?
Do you cower in fear when booting because the kernel messes up USB sda/sdb/sdc?
Do you run kernel > 2.6.37 with CONFIG_EFI_PARTITION enabled?

Now you too can rest assured that your Sheevaplug always boots at the first try! Kernel 2.6.37 introduced PARTUUID booting for GPT partitions. Basically, the kernel can lookup GPT partition's private GUID (not udev's UUID) and boot from the same device ALL THE TIME! :D

Just use gdisk to create a partition, check it's GUID, and add root=PARTUUID=XXXXXXXXXX (your GUID) in order to boot! For extra comfort, feel free to flash Arch's uImage to the plug's NAND. Easy peasy! :)

More info: http://www.linux-archive.org/gentoo-use ... eeded.html

After flashing the kernel to NAND (http://nitrogen.posterous.com/flashing- ... m-a-usb-dr) this is what I use to boot:

Code: Select all
setenv bootargs 'console=ttyS0,115200 root=PARTUUID=976F23C8-1042-4AF4-8BF8-CE8980924EAE rootdelay=15'
nand read.e 0x800000 0x100000 0x400000; bootm 0x800000


woohoo!
sardaukar
 
Posts: 2
Joined: Fri Jul 15, 2011 12:23 am

Re: The holy graal of USB booting - UUIDs without a ramdisk!

Postby WarheadsSE » Fri Jul 15, 2011 12:48 am

w00t for the non-oxnas's :p
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6660
Joined: Mon Oct 18, 2010 2:12 pm

Re: The holy graal of USB booting - UUIDs without a ramdisk!

Postby kmihelich » Fri Jul 15, 2011 1:45 am

This should definitely be guide-ified in the main site, I know this is a solution for many out there.
Arch Linux ARM exists and continues to grow through community support, please donate today!
kmihelich
Developer
 
Posts: 1123
Joined: Tue Jul 20, 2010 6:55 am
Location: aka leming #archlinux-arm

Re: The holy grail of USB booting - UUIDs without a ramdisk!

Postby sardaukar » Fri Jul 15, 2011 12:03 pm

As a bonus, you can have a single partition on the drive, no more "boot partition must be under 32GB" crap :)
sardaukar
 
Posts: 2
Joined: Fri Jul 15, 2011 12:23 am

Re: The holy grail of USB booting - UUIDs without a ramdisk!

Postby hydro » Tue Aug 30, 2011 2:09 pm

I have successfully applied this to my DockStar with Arch Linux ARM installed on an USB flash drive that initially was formatted with fdisk. Apart from reconfiguring uBoot I had to

- resize the last partition (and it's file system of course) by at least 33 sectors - this is also mentioned in the link posted above.
- convert MBR disklabel to GPT with a hybrid MBR containing the boot partition as a first partition - this was suggested here. Otherwise uBoot does not detect partitions on the USB flash drive anymore.
- delete (or rename) the uInitrd I had previously used in conjunction with /dev/disk/by-label/... - otherwise the root partition is (supposedly) not found by the kernel when using root=PARTUUID=...

Steps are described a bit more detailed on my site.
VDR on DockStar / Pogoplug E02: http://linux.bplaced.net/
hydro
 
Posts: 210
Joined: Wed Jun 15, 2011 2:03 pm
Location: Germany

Re: The holy grail of USB booting - UUIDs without a ramdisk!

Postby crimsonredmk » Thu Sep 22, 2011 10:46 pm

Someone's really gotta look into this. I wish I had time. :|
Remember, Arch Linux ARM is completely donation-supported, and is totally awesome.
crimsonredmk
Site Admin
 
Posts: 433
Joined: Wed Dec 30, 2009 5:17 pm
Location: #archlinux-arm on irc.freenode.net

Re: The holy grail of USB booting - UUIDs without a ramdisk!

Postby WarheadsSE » Tue Jan 03, 2012 12:51 am

This works with the oxnas, as of 3.1+. It's a complete pain in the *****, but it works.

:)
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6660
Joined: Mon Oct 18, 2010 2:12 pm

Re: The holy grail of USB booting - UUIDs without a ramdisk!

Postby lhassell » Thu Feb 23, 2012 10:21 pm

Newb question. I have the UUID setup. I have a v02 ("E02" model) pogoplug. How do I modify the uboot settings to set the UUID for my disk?
lhassell
 
Posts: 1
Joined: Thu Feb 23, 2012 10:19 pm

Re: The holy grail of USB booting - UUIDs without a ramdisk!

Postby WarheadsSE » Thu Feb 23, 2012 10:25 pm

Very carefully.

(hint: fw_printenv)
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6660
Joined: Mon Oct 18, 2010 2:12 pm


Return to U-Boot/Kernel

Who is online

Users browsing this forum: No registered users and 2 guests