Release Engineering


FS#10831 - 2008.06-USB boot parameter to specify root directory

Attached to Project: Release Engineering
Opened by Bruno Pena (DkSoul) - Saturday, 05 July 2008, 23:12 GMT
Last edited by Gerhard Brauer (GerBra) - Thursday, 30 July 2009, 06:02 GMT
Task Type Feature Request
Category ArchISO
Status Closed
Assigned To Aaron Griffin (phrakture)
Architecture All
Severity Low
Priority Normal
Reported Version 2007.08-2
Due in Version 2009.08-RC
Due Date Undecided
Percent Complete 100%
Votes 1
Private No


Allow to specify which is the root directory (archlive.sqfs, etc.) inside the USB Mass Storage device

Additional info:
Managed to create a patch to the initrd file archlive.img/hooks/boot-usb (using boot parameter: rootdir):

--- boot-usb-original 2008-07-05 23:46:50.078125000 +0100
+++ boot-usb 2008-07-05 23:45:22.218750000 +0100
@@ -3,7 +3,7 @@
msg ":: Waiting for usb devices to settle..."
/sbin/udevtrigger --subsystem-match=usb
- sleep 5
+ sleep 10
msg ":: Scanning for boot usb device..."

/bin/mkdir -p /bootmnt
@@ -13,7 +13,7 @@
for usb in /dev/sd[a-z][0-9]; do
if mount -r -t vfat "${usb}" ${bootmnt} >/dev/null 2>&1 ||\
mount -r -t ext2 "${usb}" ${bootmnt} >/dev/null 2>&1; then
- if [ -e "${bootmnt}/archlive.sqfs" ]; then
+ if [ -e "${bootmnt}/${rootdir}/archlive.sqfs" ]; then
msg "${usb}"
@@ -28,7 +28,7 @@
echo "ERROR: cannot find booted usb device, cannot continue..."
exit 1
- export BOOT_MOUNT="${bootmnt}"
+ export BOOT_MOUNT="${bootmnt}/${rootdir}"

Also changed "sleep 5" to "sleep 10" to allow computer to detect the USB device.

Steps to reproduce: ---
This task depends upon

Closed by  Gerhard Brauer (GerBra)
Thursday, 30 July 2009, 06:02 GMT
Reason for closing:  Implemented
Additional comments about closing:  In 2009.08-beta1 we have a new method to detect the boot device on cd iso and usb images.
Comment by Dieter Plaetinck (Dieter_be) - Monday, 26 January 2009, 20:10 GMT
Hi Bruno,
I don't really understand this: at which point do you want to be asked which is the root dir? while the initrd boots?
Also, where is this supposed to go? in our mkinitcpio package? what does this have to do with arch releases?
Comment by Bruno Pena (DkSoul) - Monday, 26 January 2009, 20:34 GMT

This patch allows to have the Arch files in a specific folder inside the pen drive.
I use it to load the LiveCD from a USB pen drive (used like a RescueCD).

My setup is:
1. USB pen drive with single partition (FAT32)
2. Bootable using GRUB (installed in the MBR of the pen, and with the necessary files in /Linux/grub/)
3. Arch Linux LiveCD files in /Linux/arch/ (archlive.img ; archlive.sqfs ; vmlinuz26 ; addons/default-config.sqfs)
4. Relevant contents of /Linux/grub/menu.lst
title Arch Linux Live 2008.06
root (hd0,0)
kernel /Linux/arch/vmlinuz26 lang=en locale=en_US.UTF-8 ramdisk_size=75% rootdir=/Linux/arch/ edd=off vga=791
initrd /Linux/arch/archlive.img
Comment by Aaron Griffin (phrakture) - Monday, 26 January 2009, 20:37 GMT
Couldn't you accomplish this simply by using a separate partition?
Comment by Bruno Pena (DkSoul) - Monday, 26 January 2009, 20:45 GMT
I'm sure there must be more ways to achieve the same result.
This way I don't have to dedicate X + Y Mb to another partition (X = specific Arch release when the partition was made; Y = spare to ensure it has enough space for future releases) which means less waste (I also use this method with other distros that I have in the pen).
Comment by Aaron Griffin (phrakture) - Monday, 26 January 2009, 21:52 GMT
After more thinking about this, it doesn't sound like a bad idea AND this might make testing easier.

Slating it for the next ISO relase (not this one)
Comment by Dieter Plaetinck (Dieter_be) - Sunday, 19 July 2009, 13:39 GMT
Can we fix this for the coming release? (which has a deadline half august) or do we delay this again?
Comment by Gerhard Brauer (GerBra) - Friday, 24 July 2009, 14:32 GMT
Sent today a patch for archiso to enable the base modifications to do this.