Ubuntu QA:
BlogBrainstormPackage status
Log in
Ubuntu QA
The Ubuntu community has contributed 22700 ideas, 138270 comments, 2629576 votes
Idea sandbox Idea sandbox
Popular ideas Popular ideas
Ideas in development Ideas in development
Implemented ideas Implemented ideas
Idea #29572: Make it easier to put multiple .iso images on a siggle USB flash device easily

Written by Andrej84 the 23 Apr 12 at 16:57. Related project: Live CD installer. Status: New
Rationale
Ubuntu Alternate/Server installer cannot be copied simply to a USB flash device then install it. The installer failes when it tries to detect the "CD-ROM".
Without external tools more installer (except desktop CD what contains Casper) cannot be put on a same USB flash device.

7
votes
up equal down
Solution #1: Modify CD detect script in initrd
Written by Andrej84 the 23 Apr 12 at 16:57.
I suggest to modify the CD detect script in initrd, it has no effect on the existing install methods, but with this modification the user will be able to put more installer to the same USB device and after booting from the USB device he can choose in grub2 menu the one what he want to install.


i suggest to add the following inside the initrd (install/initrd.gz) to file var/lib/dpkg/info/cdrom-detect.postinst right after the installer logs that it's searching for the installation media:


if db_get cdrom-detect/custom-usb && [ "$RET" = true ] && db_get cdrom-detect/uuid && db_get cdrom-detect/fs && db_get cdrom-detect/path; then
log "Trying to mount directory on custom USB drive"
device=$(db_get cdrom-detect/uuid; echo "/dev/disk/by-uuid/$RET")
fs=$(db_get cdrom-detect/fs; echo "$RET")
log "File system: $fs"
path=$(db_get cdrom-detect/path; echo "$RET")
log "Path to be mounted: $path"
mkdir /media/custom_USB
if mount -t $fs -o ro,exec $device /media/custom_USB && mount --bind /media/custom_USB/$path /cdrom 2>/dev/null; then
log "Mount of the directory on custom USB drive succeeded."
if [ -e /cdrom/.disk/info ]; then
log "CD-ROM mount suceeded: directory on custom USB drive"
mounted=1
db_set cdrom-detect/cdrom_device $device
db_set cdrom-detect/cdrom_fs $fs
break
else
log "CD-ROM mount failed: directory on custom USB drive"
umount /cdrom 2>/dev/null || true
umount /media/custom_USB 2>/dev/null || true
rmdir /media/custom_USB
fi
else
log "Mount of the directory on custom USB drive failed."
fi
fi


In this case the installer will mount that directory what contains the content of the unpacked ISO if the kernel got the neccessary parameters from grub2.

Example for the grub2 config entry:
menuentry "Ubuntu 10.04.4 Alternate 64-bit"
linux /boot/ubuntu/ubuntu-10.04.4-alternate-amd64/install/vmlinuz root=UUID=2338807b-3bb0-4372-b00d-a4b59dcc6d25 file=/cdrom/preseed/ubuntu.seed cdrom-detect/custom-usb=true cdrom-detect/uuid=2338807b-3bb0-4372-b00d-a4b59dcc6d25 cdrom-detect/fs=ext2 cdrom-detect/path=boot/ubuntu/ubuntu-10.04.4-alternate-amd64 quiet --
initrd /boot/ubuntu/ubuntu-10.04.4-alternate-amd64/install/initrd.gz



cdrom-detect/custom-usb should be true.
cdrom-detect/uuid should be the UUID of the partition what contains the unpacked ISO.
cdrom-detect/fs should be the file system type of the partition what contains the unpacked ISO.
cdrom-detect/path should be relative path (from the USB flash device) what contains the unpacked ISO.


The advantages of this method:
- User will be able to choose the installer what he wants to start from a single USB flash drive (or external HDD)
- It doesn't affect the existing installation methods
- no other software is needed in initrd (like awk what has other dependecies)
- The installer is portable, only grub2 config needs to be rewritten if the user re-format the USB device or copy the installer to another device
- it increases the installer by less than 1 kB


I don't see any disadvantage for this method.


Before this post I already uploaded this idea to Hungarian Ubuntu blog, you can see the formatted codes there: http://ubuntu.hu/node/29874
4
votes
up equal down
Solution #2: Add Mutisystem to USC
Written by mitcoes the 24 Apr 12 at 11:52.
Multisystem is a Ubuntu software - it does not work well at any other distro even debian - that you can install via PPA.

It allows you to make multi ISO USBs pendrives, and it is faster than CD/DVDs installations and cheaper if you like to test several distros.

I think that to put it at the default USC packages first and after that even at the CD/DVD iso, it would be great.

Even better if you put a /boot default partition with the Xubuntu* ISO inside and an entry at the GRUB2 menu, in order to reinstall the system if there are any great problem, keeping /home and making it fast as hell.

* I say Xubuntu because it is compatible with ATI, Unity, gnome Shell and Cinnamon have issues with ati proprietary drivers, and Kubuntu is no longer a Canonical sponsored product.

Propose your solution

Attachments
No attachments.


Duplicates


Comments
cheesehead (Brainstorm admin) wrote on the 23 Apr 12 at 20:12
Edited the title for clarity

tenplus1 wrote on the 24 Apr 12 at 08:00
It would be nice is someone could create a program like Multiboot or Yumi that will automatically set-up the flash drive for use with multiple .iso files that you copy onto the device.

Andrej84 wrote on the 25 Apr 12 at 05:29
MultiSystem is a third party tool. You can use it easily, but you don't know what were modified in the installer. Also it puts a lot of things to the USB drive what are unnecessary in most cases.
Putting a Desktop ISO to the /boot and boot it can be done without any modification of the Desktop ISO. The problem is with the Alternate and Server installers.


I suggested an official solution. With it you can simply unpack the Alternate/Server ISO into a custom directory on the USB drive and if you set the proper parameters in grub2, then you can boot it.


Post your comment