openSUSE Forums > Archives > SF Archives > ARCHIVES - Tips, Tricks & Tweaks » Making Opensuse 11.0 Beta2 Live Usb From Windows

Go Back   openSUSE Forums > Archives > SF Archives > ARCHIVES - Tips, Tricks & Tweaks
Forums FAQ Members List Search Today's Posts Mark Forums Read


ARCHIVES - Tips, Tricks & Tweaks Tips and Solutions for SUSE Linux
(Please do not post questions here)

 
Page 1 of 2 1 2
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-May-2008, 19:59
Manivas
Guest
 
Posts: n/a
Default

Introduction:

It is possible to make a live USB stick for opensuse 11.0 (I made for beta 2) from windows. It is not straight forward one, so giving the instructions here.

Prerequisites:

1) A system that is capable of booting via USB drive
2) USB disk, 1gb or more to contain live cd images
3) Download latest live cd image from opensuse -http://software.opensuse.org/developer
4) syslinux.exe to make bootable USB -http://www.kernel.org/pub/linux/utils/boot/syslinux
5) NLS modules (codepage and characterset) for fat32 filesystem on USB - tricky one as opensuse live CD did not have this on the boot CD image, as they dont need this to mount CDROM filesystem

Procedure:

Step 1) Get the USB disk bootable via syslinux. I downloaded syslinux latest version, 3.63. The command to make this drive bootable is, on the dos prompt, go the directory where you extracted the syslinux contents, and run the syslinux.exe under win32 directory with the drive letter of the USB under windows
eg: csyslinux-3.63\win32\syslinux.exe -ma e:

Step 2) Copy the opensuse live CD image contents to the USB drive. First, the ISO file of opensuse live CD image like openSUSE-11.0-Beta2-KDE4-LiveCD-i386.iso need to be extracted on the windows. Free utility 7-zip can extract the ISO image. Drag and drop the entire CD contents to the USB drive (eg: to e. (Note: We actullay need only 3 files, boot\i386\loader\linux, config.isoclient and openSUSE-11.0-read-only.i686-2.6.0 on the root, but safe to copy rest also)

Step 3) Copy the linux file and initrd file froms the live cd image file to root directory on the flash drive

Step 4) You will have problem later to mount the flash drive on linux because the default ram image (initrd) donot have NLS character sets which is required for vfat (fat32) filesystem. They do have this modules on the readonly squashfs image openSUSE-11.0-read-only.i686-2.6.0. So this need to be mounted, extract the NLS modules (/lib/modules/2.6.25-26-default/kernel/fs/nls/). Extract initrd, copy the nls modules to it and make initrd again with this changes. I have the modified initrd with nls, but i dont know where to upload that file on this forum or opensuse.org - for now, you can find that file hereftp://ftp.emc.com/incoming/suse/initrdv1 ) - Copy that file to root of flash drive

Step 5) Now the root of flash drive should have these files minimum - hidden syslinux file, linux, configf.isoclient, openSUSE-11.0-read-only.i686-2.6.0, initrdv1 - verify above steps if anything is missing or not in correct place. Create a syslinux.cfg file with the following entries:
label openSUSE-11.0
kernel linux
append initrd=initrdv1 ramdisk_size=512000 ramdisk_blocksize=4096 kiwidebug=1

Step 6) We done all the home work, ready for action now.

Step 7) Insert the flash drive and boot your PC or laptop and press keys like F12 to go to boot menu. Choose USB flash drive and enter. It would boot directly linux and initrdv1. But if you get syslinux boot prompt , Type the following at the boot prompt and press enter:
linux initrd=initrdv1 kiwidebug=1 ramdisk_size=512000 ramdisk_blocksize=4096

Step 8) The kiwi script will look to mount cdrom, will fail after 6 tries and give you shell prompt

Step 9) Follow these commands to mount the read-only-image and proceed with live CD loading
modprobe usb-storage
modprobe vfat
modprobe fat
insmod /lib/modules/2.6.25-26-default/kernel/fs/nls/nls_cp437.ko
insmod /lib/modules/2.6.25-26-default/kernel/fs/nls/nls_iso8859-1.ko
mkdir -p /cdrom /mnt/livecd /mnt/read-only-system
Step 10) Find out your flash drive win32 partition with fdisk -l (usually it will be /dev/sdb1 if you have harddisk)
fdisk -l
mount -o ro /dev/sdb1 /cdrom
mount -o ro /dev/sdb1 /mnt/livecd
mount -o loop /mnt/livecd/openSUSE-11.0-read-only.i686-2.6.0 /mnt/read-only-system
Step 11) That is it, now type "exit" at the shell to continue the opensuse kiwi boot and you will get the live image loaded

Notes:

The live cd image can be modified to include NLS modules, adding routine to detect and mount the read-only-system via USB on the init scripts. I will try contact the opensuse team about this.

If you want to make live USB disk from Linux, it is much easier. same procedure but no need to get the initrdv1 as initrd is enough. You can make ext3 filesystem on flash drive. install grub to boot (grub-install), and just do the "modprobe usb-stoage" followed by above mounts to get it working
  #2 (permalink)  
Old 15-May-2008, 23:35
Manivas
Guest
 
Posts: n/a
Default

Same procedure works for beta3 also. Updated the beta3 initrd to have NLS modules.
  #3 (permalink)  
Old 16-May-2008, 20:25
bartonexdu
Guest
 
Posts: n/a
Default

@Manivas

Great job, work for me perfectly!

Recently i am thinking about how to boot suse live cd from hard disk, but google can not help me with this untill you post the thread

For others distro live cd (fedora, pclinuxos, ubuntu, lfs...) can boot from hard disk by grub4dos in vfat ntfs filesystem. The key is initrd, but which in suse livecd only mount cdrom and then find squashfs in cd. If the live cd image can not be found, it promts that computer will reboot in several seconds.

The initrdbeta3 you create can give user a shell environment to insert mod and mount livecd image from harddisk. How to alter "reboot" to "shell env"?

One suggestion:Can you add some scripts to initrd, so that it can find not only the squashfs in cdrom but also in hard disk pendirve then mount the image file automatically.


I have seen some excellent scripts for ubuntu, here is a part of them about modules, hope it helpful!

Code:
ld_modules(){
** if [ -x /sbin/usplash_write ]; then
******/sbin/usplash_write "TIMEOUT 120"
** fi
** [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/casper-premount"
** run_scripts /scripts/casper-premount
** [ "$quiet" != "y" ] && log_end_msg
** if [ -x /sbin/usplash_write ]; then
******/sbin/usplash_write "TIMEOUT 1000"
** fi
** #usb device wait for 5 seconds
** for x in $(cat /proc/cmdline 2>/dev/null); do
******case "$x" in
******** usb*|USB* ) sleep 5;;
******esac
** done
** #file system
** modprobe -Qb loop max_loop=255;** modprobe -Qb squashfs
** modprobe -Qb ext3;** modprobe -Qb ext2
** modprobe -Qb xfs;** modprobe -Qb isofs
** modprobe -Qb jfs;** modprobe -Qb nfs
** modprobe -Qb vfat;** modprobe -Qb reiserfs
** #ntfs-3g
** #if [ -d /ntfs ]; then
******#cp -r /ntfs/* /
******#insmod /fuse/fuse.ko
** modprobe -Qb fuse
** #fi
** #aufs
** if [ -d /aufs ]; then
******cp -r /aufs/sbin/* /sbin
******insmod /aufs/aufs/aufs.ko
** fi
}
  #4 (permalink)  
Old 18-May-2008, 03:40
Manivas
Guest
 
Posts: n/a
Default

Quote:

The initrdbeta3 you create can give user a shell environment to insert mod and mount livecd image from harddisk. How to alter "reboot" to "shell env"?

[/b]
If you add the "kiwidebug=1" on the boot arguments, you will get shell instead of reboot

Quote:

One suggestion:Can you add some scripts to initrd, so that it can find not only the squashfs in cdrom but also in hard disk pendirve then mount the image file automatically.


[/b]
I didnt write automatic one yet, but it will work on the modprobe usb-storage steps. When you get shell via kiwidebug=1 parameter, run the modprobe for usb-storage which will detect pen drives, run the
fdisk -l" and see what is the value for your pen drive partition and use that to mount the squashfs filesystem as i said on the steps 9.
  #5 (permalink)  
Old 18-May-2008, 07:21
bartonexdu
Guest
 
Posts: n/a
Default

Thanks in advance for reply, i follow the procedure and boot suse livecd image from hard disk successfully.


One more question: if i want to add ntfs filesystem support in initrd, which *.ko i should insmod?

  #6 (permalink)  
Old 25-May-2008, 21:56
Manivas
Guest
 
Posts: n/a
Default

Quote:
if i want to add ntfs filesystem support in initrd, which *.ko i should insmod?
[/b]
smbfs.ko
  #7 (permalink)  
Old 26-May-2008, 08:32
solidifier
Guest
 
Posts: n/a
Default

What happened to the modified initrd on your ftp site? I don't see anything in the "incoming" dir. This seems to be the only method I can find for building a usb system using fat32. Possible to re-post the file?
  #8 (permalink)  
Old 28-May-2008, 18:11
Manivas
Guest
 
Posts: n/a
Default

Quote:
What happened to the modified initrd on your ftp site? I don't see anything in the "incoming" dir. This seems to be the only method I can find for building a usb system using fat32. Possible to re-post the file?
[/b]
uploaded the file again
  #9 (permalink)  
Old 29-May-2008, 04:56
McGregor
Guest
 
Posts: n/a
Default

Hi,
this part for beta2

Quote:
mount -o loop /mnt/livecd/openSUSE-11.0-read-only.i686-2.6.0 /mnt/read-only-system[/b]
and

mount -o loop /mnt/livecd/openSUSE-11.0-read-only.i686-2.6.1 /mnt/read-only-system

for beta3 doesn't work for me, I'm getting "wrong fs type, bad option ..." message, the squashfs module is loaded so it should work. I have read somewhere that it could be related to change of the default compressor for squash-tools from gzip to lzh.

Any ideas ?

regards,

McGregor
  #10 (permalink)  
Old 29-May-2008, 10:15
solidifier
Guest
 
Posts: n/a
Default

Quote:
Hi,
this part for beta2
and

mount -o loop /mnt/livecd/openSUSE-11.0-read-only.i686-2.6.1 /mnt/read-only-system

for beta3 doesn't work for me, I'm getting "wrong fs type, bad option ..." message, the squashfs module is loaded so it should work. I have read somewhere that it could be related to change of the default compressor for squash-tools from gzip to lzh.

Any ideas ?

regards,

McGregor
[/b]
Me, too. With the new initrdbeta3 and the syslinux.cfg listed I get a complete stop (no opportunity to type boot commands) with the error message:

VFS: Cannot open root device "<NULL>" or unknown-block(8,9)
Please append a correct "root=" boot option; here are the available partitions:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(8,9)



 
Page 1 of 2 1 2

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




 

Search Engine Friendly URLs by vBSEO 3.3.0 RC2