LiveUSB – openSUSE Lizards https://lizards.opensuse.org Blogs and Ramblings of the openSUSE Members Fri, 06 Mar 2020 11:29:40 +0000 en-US hourly 1 https://wordpress.org/?v=4.7.5 How to Make openSUSE 11.0 GM Live USB https://lizards.opensuse.org/2008/06/20/how-to-makeopensuse-110-gm-version-live-usb/ https://lizards.opensuse.org/2008/06/20/how-to-makeopensuse-110-gm-version-live-usb/#comments Fri, 20 Jun 2008 17:32:59 +0000 http://lizards.opensuse.org/?p=75 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.

]]>
https://lizards.opensuse.org/2008/06/20/how-to-makeopensuse-110-gm-version-live-usb/feed/ 17
Making openSUSE 11.0 LiveUSB : The Easiest (and Fastest) Way https://lizards.opensuse.org/2008/05/31/making-opensuse-110-liveusb-the-easiest-and-fastest-way/ https://lizards.opensuse.org/2008/05/31/making-opensuse-110-liveusb-the-easiest-and-fastest-way/#comments Sat, 31 May 2008 05:12:11 +0000 http://lizards.opensuse.org/?p=38 LiveUSB desktop

In earlier post, I’m writing “How to build openSUSE LiveUSB with Kiwi” tutorial guide and thinking how to get same results with more easier tips. Another distro came with easy trick to make a bootable LiveUSB and I think openSUSE should be 😉 . Kiwi is a great tools for making openSUSE liveUSB, QEMU Image, VMWare Image, XEN Image and LiveCD Image but it would not fit with any situation.

I’ve search various topics and found some of them looks pretty interesting to try. After reviewing some tips, here is a tutorial guide to make openSUSE 11.0 LiveUSB with the easiest way :

BENEFIT

  1. Tutorial can be used on Linux or Windows
  2. Do not need to install openSUSE onto hard disk for making LiveUSB as it was with KIWI. Just download the LiveCD ISO image and a tools for make an extract of ISO content (7-zip on Windows and mount -o loop tips on Linux)
  3. Can used FAT 32 file system for interoperability (marketing hype 😉 ) and mobility of data. Flash disk could be accessing by various OS
  4. Simple, only need a few step
  5. Fast process, required a few minutes for copying ISO image and initrd process

PREPARATION

  1. Preparing USB Flash Disk, 1 GB or more
  2. If using Windows for making LiveCD, download latest version of syslinux
  3. Download modified initrd – called initrdud – from this link. (it’s free ftp server which deleted any contents every 2 week. You could find another location from my personal blog uploads folder). The modified initrd contains modification from LiveCD boot into LiveUSB boot and addon for NLS modules (code page and character set) for FAT32 file system on USB. NOTED : for openSUSE 11.0 GM, please used this initrdud instead. Take a look on this post for the reason.

MAKE A BOOTABLE LIVEUSB

  • ON WINDOWS
  1. Run your Windows OS
  2. Plug in USB Flash Disk
  3. Extract syslinux on Windows folder
  4. Open DOS Prompt (Command Prompt)
  5. Navigate into win32 folder on syslinux folder
  6. run syslinux -ma driver-letter-of-flash-disk, eg : syslinux -ma E: if E is your USB Flash Disk. Note : The process need a few second to make a bootable USB disk with syslinux, so don’t wait the process finished for 1 minutes or more 😀
  • ON LINUX
    1. Find your USB disk with df -h on konsole.
    2. Install syslinux and run syslinux /dev/sdx from konsole where /dev/sdx is your USB device
    3. If the above process failed for making bootable USB disk, try another tips

PROCESSING THE IMAGE

  1. Plug in bootable USB disk
  2. Create temporary folder for mounting LiveCD ISO Image mkdir liveiso
  3. Mount ISO image into specified folder mount -o loop openSUSE-11.0-RC1-KDE4-LiveCD-i386.iso liveiso/ (I’m currently using openSUSE 11.0 RC1 KDE. Make a proper changes to your ISO image)
  4. Copying all of liveiso content (mounted ISO content) into USB disk
  5. Copying all of content on boot/i386/loader folder into root folder of USB disk
  6. Rename isolinux.cfg on root folder of USB disk into syslinux.cfg
  7. copying initrdud into root folder of usb disk
  8. Make a few modification into syslinux.cfg, so, USB live will boot with initrdud. Make a change to this line : append initrd=initrd ramdisk_size=512000 ramdisk_blocksize=4096 splash=silent showopts into append initrd=initrdud kiwidebug=1 ramdisk_size=512000 ramdisk_blocksize=4096 splash=silent showopts kiwidebug=1 option will log any error while booting LiveUSB

TESTING

  1. Boot your computer with USB HDD as top of boot device priority or make a hot boot change by pressing F12, F8, F9 or any key according to your computer
  2. While booting, just press ENTER on boot option. Typing Live-System as mentioned on boot message will failed 🙂 regarding kernel image

LiveUSB Sysinfo

LIVEUSB INSTALLATION SCREENSHOT

Below are some LiveUSB installation screenshot.

LiveUSB Installation Screen

LiveUSB Installation Screen

LiveUSB Installation Screen

CREDIT

Thanks to Manivas for great idea & tutorial.

FUTURE IDEA

Coolo was discarded his experimental test for making openSUSE liveUSB. The above process should be fine and *I think* quite enough to provide openSUSE LiveUSB for 11.0 released. By automating overall process and making a nice GUI, it should be increasing openSUSE 11.0 features. (if you asked me, “Why don’t you create automated process tools by yourself”, my answer is : “Yes, I will. I just thinking that it may need a less than a day for experience openSUSE developers for making the tools rather than waiting my C++ & QT course finished 😀 )

In 10.3, it was need a month after official release of 10.3 on October 04, 2008 for releasing LiveCD version of openSUSE. With this experience, is this possible to make this features included on openSUSE 11.0 ?

]]>
https://lizards.opensuse.org/2008/05/31/making-opensuse-110-liveusb-the-easiest-and-fastest-way/feed/ 35
openSUSE LiveUSB with KIWI https://lizards.opensuse.org/2008/05/21/opensuse-liveusb-with-kiwi/ https://lizards.opensuse.org/2008/05/21/opensuse-liveusb-with-kiwi/#comments Wed, 21 May 2008 04:51:19 +0000 http://lizards.opensuse.org/?p=28 liveusb sysinfo

As mentioned on previous post, today I’m playing with LiveUSB creation. Coolo, our lovely (and busy 😉 ) openSUSE project manager discard his experimental test of making LiveUSB due to various specific problem with the USB.

I released factory snapshots of USB and CD images – the USB shows just too many USB specific problems to be worthy, so I kind of decided to kill this idea again ;( More…

Before taking the tutorial mentioned by Luiz Fernando, I’m trying with KIWI LiveUSB stick tutorial. I’ve followed the tutorial last month but the process unfinished yet due to the complaining from KIWI that the image doesn’t fit on my 2 GB USB Flash Disk. At the moment, I was stopped the process and planned to continue after buying another bigger flash disk. I take this conclusion with the assumption KIWI need more than 2 GB of USB disk.

Today I used same tutorial with another assumption 😉 , probably the problem occurred due to the annoying bug with KIWI in earlier version, not with the size of USB disk. KIWI using same image used by LiveCD (about 700 MB), so, 2 GB of USB disk should be fit with the requirement of KIWI for building live USB stick.

With this assumption, I’m trying KIWI once again for building live USB stick with same device (2 GB of USB flash disk), and now the process ended successfully. I could make a running USB Live stick with KIWI Wiki guidance for making USB live stick. Below is the summary of guidance :

  1. Install openSUSE with standard option. The easiest way is using openSUSE liveCD installation 😀 , but you still needed an installation DVD or DVD iso image as base installation source.
  2. Copying the entire content of installation DVD to specified folder as installation source. If you used iso image, you could mount the iso into specified folder with this command : mount -o loop name-of-iso-image specified-folderex : mount -o loop openSUSE-10.3-GM-DVD-i386.iso /mnt/iso
  3. Add the KIWI installation source.
  4. zypper sa http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_10.3 kiwi

  5. Installing kiwi component :
  6. zypper in kiwi kiwi-desc-livesystem kiwi-desc-usbboot

  7. Make proper changes to usbboot config.xml files on /usr/share/kiwi/image/usbboot/suse-10.3/config.xml and replace following lines with your local repos :
  8. <repository type="yast2" status="replaceable">
    <source path="/image/CDs/full-10.3-i386"/>
    </repository>

  9. Make proper changes to livecd config.xml /usr/share/kiwi/image/kwliveCD-suse-10.3/config.xml and replace this portion xml code to your local repos :
  10. <repository type="yast2">
    <source path="/mounts/dist/install/SLP/openSUSE-10.3-GM-DVD/i386/DVD1/"/>
    </repository>
    <repository type="rpm-md">
    <source path="http://download.opensuse.org/repositories/openSUSE:/10.3:/Testing/openSUSE_10.3/"/>
    </repository>
    <repository type="rpm-md">
    <source path="http://download.opensuse.org/update/10.3/"/>
    </repository>

  11. Newer version of KIWI complaining about the version number on config.xml (it should be version number, major and minor changes), so, change this line : <version>2.5</version> with something like <version>2.5.0</version>
  12. Remove file .checksum.md5 on /usr/share/kiwi/image/usbboot/suse-10.3/ (it’s hidden file, so make a deal with your display on file manager preferences, ie : show hidden files on konqueror)
  13. Clean up temporary folder for kiwi processing
  14. rm -rf /tmp/kiwi*

  15. Run the kiwi command (replace KDE with Gnome if you more preferred with GNOME desktop manager)
  16. kiwi --prepare /usr/share/kiwi/image/kwliveCD-suse-10.3 --root /tmp/kiwi-tmp --add-profile KDE --logfile terminal

  17. Kiwi will processing and building the image. It should be ended with the information “KIWI exited successfully done”. If you get an error exception, please make a deal with the error 😉
  18. Create the compressed image. The process will produces the image named openSUSE-10.3.i686-2.5.0 on /tmp/kiwi-image/
  19. mkdir /tmp/kiwi-image
    kiwi --type usb --create /tmp/kiwi-tmp -d /tmp/kiwi-image --logfile terminal

  20. Plugin your USB flash disk and specifies the location of your USB flash on /dev folder (ls /dev/sd* will display your USB flash disk at the end of the list)
  21. Umount (ie : umount /dev/sdc1)
  22. Create a bootable LiveUSB stick with openSUSE 10.3 by run the command :
  23. kiwi --bootstick /tmp/kiwi-image/initrd-usbboot-suse-10.3.i686-2.1.1.splash.gz --bootstick-system /tmp/kiwi-image/openSUSE-10.3.i686-2.5.0

  24. Try your LiveUSB stick by rebooting with USB boot as your first device boot priority.

LiveUSB partition

The above procedure using openSUSE 10.3 as base installation but the overall process *should be* work with openSUSE 11.0 or newer version with a small modification. Please change the process path according your openSUSE version.

]]>
https://lizards.opensuse.org/2008/05/21/opensuse-liveusb-with-kiwi/feed/ 7
Playing with openSUSE on LiveUSB Stick https://lizards.opensuse.org/2008/05/19/playing-with-opensuse-on-liveusb-stick/ https://lizards.opensuse.org/2008/05/19/playing-with-opensuse-on-liveusb-stick/#comments Mon, 19 May 2008 21:05:15 +0000 http://lizards.opensuse.org/?p=24 Today (Tuesday in Indonesia, May 20, 2008) is a public holiday in Indonesia regarding Waisak day (Waisak is a Buddhist event). My agenda for this holiday is give a training session about Zimbra Collaboration Suite with openSUSE 10.3. The training session started on 09.00 am until 03.00 pm but I think I can spare about minimum 20% of my holiday time to an interesting stuff. It’s a public holiday and I don’t want to work all of the time 😉 .

The first interesting stuff is making a LiveUSB stick for openSUSE. It’s not a really new because KIWI has an entry about how to make a live usb on openSUSE wiki, but I give it another try after reading Coolo’s announcement about new factory snapshot on Sunday, May 18, 2008.

http://ftp.suse.com/pub/projects/FactoryLiveCDs/ has new live cds as of today. Please note that it also has the first experimental release of live usb images.

  • Plugin in usb stick
  • Check dmesg output about the device name (e.g. sdc)
  • Umount all possibly automounted file systems
  • bzip2 -cd <download>.raw.bz2 | dd of=/dev/<device_name> bs=4096

It’s the first experimental release, so, it would be produces an error on live USB processing. Mailing list thread show some of the problem regarding this experimental. With a simple command to making a live USB, the experiment seems to be a nice addon for next RC1 release 🙂 .

The third way for making a LiveUSB stick with openSUSE is a wiki entry on klik.atekon.de, “Customize SUSE Live”. Luiz Fernando send an information about his work for making LiveUSB based on openSUSE 11.0 beta 3.

I tried making a LiveUSB from LiveCD of Beta3 following this tutorial http://klik.atekon.de/wiki/index.php/CustomizeSUSELive which I only had to make a new initrd with support for usb-storage, vfat modules. More…

So, I have 3 option for making a LiveUSB stick with openSUSE as my agenda before and after Zimbra training session.

The second interesting stuff is related with Zimbra itself. I’m thinking to write unattended Zimbra installation script on openSUSE 10.3 while on the way to work place yesterday morning. With the easier way to install Zimbra on openSUSE, I hope I can reached wide openSUSE adoption in server side and in enterprise solution, especially in Indonesia.

I will describe the idea and how to make it possible in next post.

]]>
https://lizards.opensuse.org/2008/05/19/playing-with-opensuse-on-liveusb-stick/feed/ 3