Multiboot USB Drive

I just created a usb drive containing different linux distributions. I wanted the drive to have the original iso files on it with no need to unpack.

Here is what I did:

sudo mkfs.vfat -n MultibootUSB /dev/sdd1
sudo mount /dev/sdd /mnt/
sudo grub-install --no-floppy --root-directory=/mnt /dev/sdd

All iso files have to put to ‘/mnt/iso’.
My config file ‘/mnt/boot/grub.cfg’ can be downloaded here.

Especially the configuration for Arch Linux was a bit tricky to create.
‘archisolabel’ has to be the label of the image file used.
‘img_dev’ is set to the uuid of the usb device used.

Quite interesting is also the remastering of certain files. I put the neo keymap into /arch/any/usr-share.fs.sfs.

See here: If anybody wants to have the iso file, just tell me.

For further information check:

Android + Linux

Just as a reminder for myself. To connect my Thinkpad Tablet to my Arch Linux PC the following was really helpful:

On Arch Linux the package in AUR is currently called go-mtpfs-git

Bash Example Script #2

I have added the following function to my bash example script:

# Run external command and only procced, when exit code is 0
function try {
	echo "$returnValue"
	if [ $returnValue -ne 0 ]
		log $ERROR "$@ exited with return value \
		$returnValue Script will stop here."
		echo "$@ exited with return value $returnValue. \
		Script will stop here."

The function takes a program as an argument and runs in. If the program returns with a status other then 0, so it fails, then the script will print an error message, log it and and exits. I needed this behaviour in some recent scripts and hope it to be usefull for everybody else.