Home Home > 2008 > 06 > 20 > How to Make openSUSE 11.0 GM Live USB
Sign up | Login

How to Make openSUSE 11.0 GM Live USB

June 20th, 2008 by

openSUSE 11.0 with tons of impovement has been announced on June 19, 2008. Since then it was a busiest day for me : setting up a local mirror providing iso image for openSUSE fans in Indonesia, arrange openSUSE 11.0 release party and preparing Indonesian openSUSE community regular meeting on Saturday, June 21, 2008. We have planned all of these since last month but I must updated the planning with latest news and preparation.

Beside the planning, I also read some comments that noticed me with problem regarding openSUSE LiveUSB tutorial. The tutorial used openSUSE 11.0 RC1 and the modified initrd as noticed on the tutorial doesn’t fit with the GM version.

I have updated the initrdud that *should be*  applied with openSUSE 11.0 GM. I got it succeeded with my 2 GB USB Flash Disk. The overall process to make openSUSE 11.0 GM LiveUSB are same as described on the previous tutorial with RC1. The different thing is initrdud file.

openSUSE 11.0 LiveUSB sysinfo

openSUSE 11.0 LiveUSB Partitioner

Download the modified initrd file (called initrdud) from this link.

How to Modify the Initrd

Initrd modification needed to add nls_cp437.ko, module for mount vfat partition that commonly used by USB flash disk.

  1. Preparing your LiveUSB ISO. In this example, I used openSUSE-11.0-KDE4-LiveCD-i386.iso. Change with your downloaded LiveCD ISO instead
  2. Preparing, Extract and update the initrd
  3. su
    mkdir unpacked
    mkdir /mnt/iso
    mkdir /mnt/squash
    mount -o loop openSUSE-11.0-KDE4-LiveCD-i386.iso /mnt/iso/
    cd unpacked
    gzip -dc /mnt/iso/boot/i386/loader/initrd | cpio -i
    mount -o loop /mnt/iso/openSUSE-*read-only.* /mnt/squash/
    cp /mnt/squash/lib/modules/*/kernel/fs/nls/nls_cp437.ko lib/modules/*/kernel/fs/nls/
    cp /mnt/squash/lib/modules/*/kernel/fs/nls/nls_iso8859-1.ko lib/modules/*/kernel/fs/nls/
    cp -r /mnt/squash/lib/modules/*/kernel/fs/vfat lib/modules/*/kernel/fs/
    cp -r /mnt/squash/lib/modules/*/kernel/fs/fat lib/modules/*/kernel/fs/

  4. Edit the linuxrc file and change /bin/sh on top of the file with /bin/sh -x. This used for verbose option while boot, every command will be display before executed so if there is a problem, it will more easier to resolve.
  5. Modify the include file and change (replace) the function CDDevice with below code. This will change LiveCD to LiveUSB.
  6. function CDDevice {
    	# /.../
    	# changed this function so that it finds config.isoclient on vfat disks, e.g. USB drives
    	# ----
    	find /lib/modules/*/kernel/fs/nls/nls* -exec insmod {} \; # needed for vfat filesystem
            find /lib/modules/*/kernel/fs/*fat/*.ko -exec insmod {} \; # needed for vfat filesystem
            insmod /lib/modules/*/kernel/drivers/usb/storage/usb-storage.ko # needed for USB
    	sleep 5 # fixme; do this in a proper way
    	cddevs=`/usr/sbin/hwinfo --disk | grep sd | grep "Device File:" | cut -f2 -d: | cut -f2 -d " "` # looks for disks instead of CDs
    	echo cddevs $cddevs
    	for i in $cddevs;do
    		i=$i"1" # fixme; looks on the first partition only
    		echo i $i
    		if [ -b $i ];then
    			test -z $cddev && cddev=$i || cddev=$cddev:$i
    			echo cddev $cddev
    		fi
    	done
    	if [ -z $cddev ]; then
    		systemException \
    			"Failed to detect CD drive !" \
    		"reboot"
    	fi
    }
    
  7. Repack the initrd. We will place the initrdud in root of cureent folder :
  8. find . | cpio -o -H newc | gzip -9 > ../initrdud
    

Hope the above process solve the problem while making openSUSE 11.0 GM LiveUSB. Don’t forget to place a comment if you got any problem regarding this tutorial.

Both comments and pings are currently closed.

17 Responses to “How to Make openSUSE 11.0 GM Live USB”

  1. Raffo

    The file /mnt/iso/openSUSE-*read-only.* cannot be mounted unless your system supports the SquashFS filesystem. My computer (10.1) does not seem to support it.

  2. FameWOlf

    Can you give us the steps to make the extra space on our usb keys available? Perhaps we could run a script which would mount a new home after boot so at least configuration preferences would be kept?

  3. mimoune djouallah

    unfortunately, i fellowed your tutorial the last time with opensuse-kde 11 rc2, first it boot from the usb flash disk, but after that, the kernel complains, that it can find my usb driver ;(
    definitively opensuse lags really in this field

  4. mimoune djouallah

    unfortunately, i followed your tutorial the last time with opensuse-kde 11 rc2, first it boot from the usb flash disk, but after that, the kernel complains, that it can find my usb driver ;(
    definitively opensuse lags really in this field

  5. FameWolf

    djouallah,

    The whole purpose of his new initrdud is to correct the error you are reporting. It works fine with Opensuse 11 final. His previous tutorial was for RC1..not RC2 which was supposed to be an internal build only and not be ran by general public.

  6. johnny

    Hi,

    I used Grub to boot the original and then also your manipulated initrd file using the following grub entry:

    title openSUSE-11.0 extracted ISO
    root (hd0,0)
    kernel /linux
    initrd /initrdusb kiwidebug=1 ramdisk_size=512000 ramdisk_blocksize=4096 splash=silent showopts

    It boots and everything but then in both cases (original and manipulated initrd) reboots sind I have no CD-Drive (Thinkpad X61s has no optical drive). The problem is in this code:

    if [ -z $cddev ]; then
    systemException \
    “Failed to detect CD drive !” \
    “reboot”
    fi

    Can you remove it an offer a new initrd?

    • Hi Johnny,

      I’ll be update with the requested initrdud.Thanks for your info.

      • condor64

        Hi,

        Is there is a solution for this error “Failed to detect CD drive !” ?
        I tried to make my initrdud but it’s always the same. I always have this error .

        Thanks in advance

        Condor64

  7. Rohan Dhruva

    Hi,

    Nice guide, but I found 2 mistakes-

    1) The mount command formatting is not correct. Maybe it is caused by wiki-markup issues.
    2) You mkdir /mnt/squash but then mount it to /media/squash :)

    Thanks!
    Rohan.

  8. dimas

    Voila This is what I have been waiting for so long since the first day I use SUSE LINUX. Hip-hip Huray, Hip-hip Huray, Hip-hip Huray.

  9. Hell yeah! I’ve just read your tutorial on your local blog about running a live iso through usb flash drive, and i’ve tried but failed due to this exact error. :D Glad that i’m not the only one having this error. Will try replace the file now. Thanks for the tutorial. 8)

  10. Scott

    I made a change to the include function as I was using a different partition. Just the for loop is changed:

    for i in $cddevs;do
    for j in 1 2 3 4 5 6 7 8 9 10 # fixme; looks only in first 10 partitions
    do
    echo j $j
    devi=$i$j
    echo devi $devi
    if [ -b $devi ]; then
    test -z $cddev && cddev=$devi || cddev=$cddev:$devi
    echo cddev $cddev
    fi

    done
    done

  11. G Turing

    I’m stop in “Couldn’t find CD image configuration file”

  12. swordcatchr

    Hi.

    As a little unexperienced SUSE beginner, i’m glad that i’ve found this tutorial.
    But i got stuck now.

    I used the Live-CD-Image from this source: http://download.opensuse.org/distribution/11.1/iso/openSUSE-11.1-KDE4-LiveCD-i686.iso
    and modified the initrdud as described above.

    The only exception is the linuxrc-file, there was no line like “/bin/sh” where i could start to display the executed commands. The other shell called in the first line is taken out with a comment-sign “#”, so i didn’t know how to display the called commands in the terminal window.

    The Stick will boot but i get this lines (copied by hand):

    —-begin of copy—–

    —–> Probing module: ata_piix
    —–> Probing module: uhci-hcd
    —–> Probing module: ehci-hcd
    cddevs /dev/sda /dev/sdb
    i /dev/sda1
    cddev /dev/sda1
    i /dev/sdb1
    cddev /dev/sda1:/dev/sdb1
    —–> Mounting live boot drive…
    —–> Failed to mount RW root filesystem
    —–> shellException: providing shell…
    (none):/ #

    —-end of copy—–

    Booting from a real Live-CD works fine.
    Has anybody a hint for me, why the filesystem will not be mounted?
    Thanks in advance.

    • swordcatchr

      Update: thanks google i found a solution (but unfortunately i don’t understand the reason why this works).

      I had to erase the file named: “config.isoclient”
      and i renamed the file “config.kde.isoclient” to “config.isoclient”.

      Anyone who can explain me, why the original file was empty and what the entries in the other file are for?
      Thanks in advance.