FedoraForum.org - Fedora Support Forums and Community
Results 1 to 9 of 9
  1. #1
    Join Date
    Jun 2007
    Location
    Washington DC
    Posts
    338

    Update kernel with syslinux (LiveUSB)

    Greetings

    Anyone know of how to update your kernel on the LIveUSB image created with livecd-tools...I already tried editing the syslinux.cfg and placing the initrd and vmlinuz in the syslinux directory after creating a custom initrd with the new kernel options, but it hangs at not being able to mount the new /dev/root

    Was wondering if anyone tried this before as I wanted to install the new kmod-nvidia packlages but the only prebundled rpms from livna are for the 2.6.25.3-18 kernel and the LiveUSB made is from the original golden disk ISO.

    Thanks
    "You're as useless as a jiffy in a tickless kernel."

  2. #2
    Join Date
    Oct 2004
    Location
    London, UK
    Posts
    4,999
    Have you tried installing with a persistence layer enabled and then yum update the kernel?

    (This works for most packages, but I haven't tried it with the kernel)
    Last edited by sideways; 2nd June 2008 at 03:26 PM.

  3. #3
    Join Date
    Jun 2007
    Location
    Washington DC
    Posts
    338
    Greetings

    Thanks for the reply -- yes I have, it installs the kernel the "normal" way ... if you noticed, the kernel layer is setup a little differently in the live images

    It installs the necessary files (/lib/modules/$(uname -r) etc...) so what I am trying is to just copy the vmlinuz file to the syslinux directory of the the live usb then copy the initrd0.img from there to a working directory, unzipped and make-directories from the cpio image. Then just move over the init and nash scripts along with the different sbin --- but this is my first delve into syslinux....
    "You're as useless as a jiffy in a tickless kernel."

  4. #4
    Join Date
    Jun 2007
    Location
    Washington DC
    Posts
    338
    So thus far here is what I have done:

    in the 2.6.25.14 (default) LiveUSB I installed the new kernel (2.6.25.3-18)

    un"cpio"ed the initrd0.img on the USB
    made the initrd for the 2.6.25.14 with various preload= options for usb, ahci, cdrom, etc (used the /dev/modules dir in the current initrd0.img for a guide)
    then moved the subseuqnet init and sbin, bin, lib64 dirs to the new cpio working initrd
    removed everything under /dev
    rebooted

    I got to a WARNING about root not being linked, so I ran

    ln -s /dev/sdb1 /dev/root
    exit

    and it boots into the new kernel, but I get an error on the persistant overlay layer not being found ... so I need to figure out how to get that working in the syslinux initrd....also you have to edit the syslinux.cfg to add an entry for the new kernel, as well as copy the vmlinuz file to the liveusb syslinux directory ...

    If anyone has been able to get the overlay layers to persist across new kernels on the liveUSB let me know, otherwise I will do a little writeup after I am done and if I get it all to work
    "You're as useless as a jiffy in a tickless kernel."

  5. #5
    Join Date
    Jan 2006
    Posts
    2,799
    I noticed a script in the mkinitrd package called mkliveinitrd you may want to try it.

    # /usr/libexec/mkliveinitrd --help
    /usr/libexec/mkliveinitrd [--help] <out-initrd-image> <kernel-version>

    example: /usr/libexec/mkliveinitrd /boot/myinitramfs.img `uname -r`

  6. #6
    Join Date
    Jun 2007
    Location
    Washington DC
    Posts
    338
    Thanks for your replies!!!

    I got it to work, very hacked-jawed, but it works at least so now I can install livna-kmod-nvidia and get Compiz-Fusion working ;-) all this for eye-candy, I know right, I need to rewrite my notes but the jist is:

    [1] boot from LiveUSB premade with livecd-tools
    [2] mkdir -p /home/working; cp -p /media/LINUXUSB/syslinux/initrd0.img /home/working
    [3] mv /home/working/initrd0.img /home/working/initrd0.img.gz; mkdir -p /home/working/init-orig
    [4] mv /home/working/initrd0.img.gz /home/working/init-orig; cd /home/working/init-orig
    [5] gunzip initrd0.img.gz; cpio -cid -I initrd0.img
    [6] cd ../; mkdir init-new; cd init-new
    [7] mkinitrd /home/working/init-new/initnew.img --preload=$OPTIONS 2.6.25.3-18.fc9.x86_64

    where $OPTIONS would be all the USB (uhci, ehci, ohci) modules, along with your hdd modules, cdrom modules, etc ... if you want a good baseline to follow check out the modules the orig initrd loads

    [8] then undue the initrd (initnew.img) you just made via gunzip and cpio
    [9] remove the link from sbin to bin
    [10] move contents of init-orig/sbin to the new init-new/sbin
    [11] also copy in missing lib64 libs (or lib if using 32bit)
    [12] edit the syslinux.cfg to add a new entry for the new image (i called it initrd1.img and vmlinuz1)
    [13] copy the vmlinuz file from the new kernel into the syslinux directory for the LiveUSB
    [14] copy over the /lib/udev/vol_id (to get persistant layer to show up using the blkid)
    [15] reboot

    I know it isn't the best outline, and not sure this is the easiest way, but I learned all i wanted to know about the livecd-tools options ... I think you can also overide the limit 1024 overlay inside the init script for livecd-tools by changing the $OVERFILE if/elif conditional exit, will try it later ;-)

    Thanks again, please feel free to post any comments or easier ways etc etc
    "You're as useless as a jiffy in a tickless kernel."

  7. #7
    Join Date
    Jan 2006
    Posts
    2,799
    I think I found a somewhat easier way. I patched the mkliveinitrd file to include the necessary modules. Normally that file is called by another script but this patch makes it work standalone.

    --- mkliveinitrd.orig 2008-05-06 07:15:33.000000000 -0700
    +++ mkliveinitrd 2008-06-02 11:10:31.000000000 -0700
    @@ -92,7 +92,10 @@
    source /etc/sysconfig/mkinitrd
    fi

    -MODULES+=" "
    +MODULES+="squashfs ext3 ext2 vfat msdos "
    +MODULES+="sr_mod sd_mod ide-cd cdrom "
    +MODULES+="ehci_hcd uhci_hcd ohci_hcd "
    +MODULES+="usb_storage usbhid "

    if [ "$opt_verbose" == "1" ] ; then
    echo "Kernel modules requested: $MODULES"

    Then to create the new initrd I changed to the directory syslinux and used the command

    /usr/libexec/mkliveinitrd -f -v initrd1.img 2.6.25.3-18.fc9.i686

    then I copied the kernel file from /boot to the syslinux directory, called it vmlinuz1 and made a new entry in syslinux.cfg
    label linux1
    menu label Boot 2.6.25.3-18.fc9
    kernel vmlinuz1
    append initrd=initrd1.img root=UUID=E230-D4B0 rootfstype=vfat rw quiet liveimg overlay=UUID=E230-D4B0

    and it boots. I'm using it now.

  8. #8
    Join Date
    Jun 2007
    Location
    Washington DC
    Posts
    338
    Thanks -- I just got to that same place (helps if I read your posts complete, I saw for some reason mkLVMinitrd and assumed it was a new tool for root on a lvol that auto loaded the dm modules, LOL) but when I looked again I realized the err of my ways, many thanks ... probably about as simple a patch can get ;-) thanks again!

    Funny thing the liveUSB ... never really looked at a liveCD too closely before as I mainly have been a Knoppix guy but with the persistence layer on the F9 liveUSB a lot of people at work suddenly wanted so they could free themselves of Putty on their work laptops which they aren't theoretically suppose to change from the default configurations --- funny thing is all the support laptops are XP or NT while the systems and network we support are RHEL, HPUX, and various other BSD/SysV hybrids but the beauty of corporate america ;-)

    Thanks again
    "You're as useless as a jiffy in a tickless kernel."

  9. #9
    Join Date
    Jan 2006
    Posts
    2,799
    You're welcome and you're right, it sure is fantastic to be able to take linux with you on the go!

Similar Threads

  1. Syslinux 3.75: Could not find kernel image: linux
    By wutzu in forum Installation, Upgrades and Live Media
    Replies: 2
    Last Post: 8th August 2009, 05:32 AM
  2. Not enough room to update on LiveUSB?
    By YAOMTC in forum Installation, Upgrades and Live Media
    Replies: 12
    Last Post: 8th April 2009, 05:27 PM
  3. Fedora 9 LiveUSB System update problem
    By schmidty313 in forum Using Fedora
    Replies: 0
    Last Post: 9th November 2008, 08:20 PM
  4. FC4 CD/DVD Installer Syslinux Crash Workaround
    By wtogami in forum EOL (End Of Life) Versions
    Replies: 47
    Last Post: 26th February 2007, 07:34 AM
  5. What is syslinux.exe ?
    By mickeyboy in forum Using Fedora
    Replies: 2
    Last Post: 27th June 2004, 01:02 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •