Page 1 of 3 123 LastLast
Results 1 to 10 of 21

Thread: [howto] tweaking a livecd in order to blacklist offending kernel modules

  1. #1
    Join Date
    Aug 2006
    Beans
    841

    [howto] tweaking a livecd in order to blacklist offending kernel modules

    ive got one of the laptops affected by the following bug: http://bugzilla.kernel.org/show_bug.cgi?id=9905

    with more info here:

    https://bugs.launchpad.net/ubuntu/+s...ux/+bug/187671


    there has been a patch released to fix the issue, but the likeliness of it being included in the intrepid release is small, so ive decided to jump ahead and make a livecd that will boot in these laptops.

    the procedure consist on the following:

    • download a livecd
    • extract it with archive manager
    • use squashfs to uncompress the livecd filesystem
    • edit /etc/modprobe/blacklist to blacklist the offending modules
    • repack the livecd filesystem
    • create a bootable iso
    • burn


    first things first: you need to have squashfs-tools and genisoinage, so
    Code:
    $ sudo apt-get install squashfs-tools genisoimage

    now we begin: download the livecd you wish to be able to boot.

    then extract the contents of the livecd to a folder in your desktop called isofs using the archive manager.

    next, open a terminal by pressing [alt]-[f2] and typing
    Code:
    gnome-terminal
    and execute:
    Code:
    $ cd ~/Desktop
    $ sudo unsquashfs ~/Desktop/isofs/casper/filesystem.squashfs
    which will uncompress the livecd filesystem so that we can modify it.

    now we edit the blacklist file with
    Code:
    $ sudo gedit ~/Desktop/squashfs-root/etc/modprobe.d/blacklist
    and add to the end of the file the following lines:
    Code:
    blacklist sdhci
    blacklist sdhci-pci

    next step involves rebuilding the squashfs

    Code:
    $ sudo rm ~/Desktop/isofs/casper/filesystem.squashfs
    $ sudo mksquashfs ~/Desktop/squashfs-root ~/Desktop/isofs/casper/filesystem.squashfs
    and we make sure we can read the file when creating the iso:
    Code:
    $ sudo chmod a+r ~/Desktop/isofs/casper/filesystem.squashfs
    next step involves creating the bootable cdrom image:

    Code:
    $ cd ~/Desktop/isofs
    $ mkisofs -o ~/Desktop/livecd_nosdhci.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -J ~/Desktop/isofs/
    finally, burn the image livecd_nosdhci.iso with brasero, and test it
    Last edited by eldragon; October 25th, 2008 at 03:06 PM.

  2. #2
    Join Date
    May 2008
    Beans
    Hidden!
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: [howto] tweaking a livecd in order to blacklist offending kernel modules

    I haven't tried following your instructions, but I've spotted two little mistakes:

    First, by "open a terminal, [alt]-[f2] and type ..." I think you mean "open a terminal by pressing [alt]-[f2] and typing ..." (else you open a terminal and from there you open a terminal..).

    Second, ~\Documents should be ~/Documents.

    I'll let you know if I try this out and find any other hiccups (this will be in a week's time).

    Thanks for doing this.

  3. #3
    Join Date
    Aug 2006
    Beans
    841

    Re: [howto] tweaking a livecd in order to blacklist offending kernel modules

    Quote Originally Posted by pablomme View Post
    I haven't tried following your instructions, but I've spotted two little mistakes:

    First, by "open a terminal, [alt]-[f2] and type ..." I think you mean "open a terminal by pressing [alt]-[f2] and typing ..." (else you open a terminal and from there you open a terminal..).

    Second, ~\Documents should be ~/Documents.

    I'll let you know if I try this out and find any other hiccups (this will be in a week's time).

    Thanks for doing this.
    thanks, i fixed both mistakes.

    i did manage to get a working live cd with this

  4. #4
    Join Date
    May 2008
    Beans
    Hidden!
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: [howto] tweaking a livecd in order to blacklist offending kernel modules

    Ok, I've tried this now. Here is a slightly modified howto which uses sudo only when strictly required, and incorporates some tips from the Ubuntu Wiki page on liveCD customization.

    1. Open a terminal

    You can open it from Applications > Accessories > Terminal, or alternatively pressing Alt+F2 and typing gnome-terminal in it.

    2. Enter sudo password

    Type
    Code:
    sudo -v
    and enter your password.

    3. Install things

    To make sure you have all the programs you need, type
    Code:
    sudo apt-get install squashfs-tools genisoimage fakeroot file-roller
    4. Set up

    Type this, changing the values of the variables to specify what you want to do:
    Code:
    ORIG_IMAGE=~/Desktop/ubuntu-8.10-rc-desktop-i386.iso
    MOD_IMAGE=~/Desktop/ubuntu-8.10-rc-desktop-i386-nosdhci.iso
    MOD_LABEL="Ubuntu 8.10 i386"
    TEMP_DIR=~/tmp
    ORIG_IMAGE should point at the ISO file you already have, and MOD_IMAGE says where to put the modified ISO. MOD_LABEL and TEMP_DIR can be safely left alone.

    5. Proceed

    Copy this and paste it into your terminal verbatim:
    Code:
    mkdir -p "$TEMP_DIR/mod-distrib/ISO"
    cd "$TEMP_DIR/mod-distrib"
    file-roller -e ISO "$ORIG_IMAGE"
    sudo unsquashfs ISO/casper/filesystem.squashfs
    #START MODIFICATIONS
    echo "# Local blacklist" > squashfs-root/etc/modprobe.d/blacklist.local
    echo "blacklist sdhci" >> squashfs-root/etc/modprobe.d/blacklist.local
    echo "blacklist sdhci-pci" >> squashfs-root/etc/modprobe.d/blacklist.local
    #END MODIFICATIONS
    rm ISO/casper/filesystem.squashfs
    sudo mksquashfs squashfs-root ISO/casper/filesystem.squashfs -nolzma
    sudo chown $USER ISO/casper/filesystem.squashfs
    rm -rf squashfs-root
    cd ISO
    rm md5sum.txt
    find . -type f -print0 | xargs -0 md5sum > md5sum.txt
    fakeroot mkisofs -D -r -V "$MOD_LABEL" -cache-inodes -J -l -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o "$MOD_IMAGE" .
    cd .. && rm -rf ISO
    cd && rmdir "$TEMP_DIR/mod-distrib"
    After a little wait the modified ISO will be on your desktop (or wherever you decided to place it), and all the messy temporary bits should have been cleared away. You can burn your ISO to a CD by double-clicking on it (provided you haven't explicitly modified this behaviour!)

    If you need to do any other straight-forward modifications to the distribution (ie. add, remove or modify configuration files), do them between "#START MODIFICATIONS" and "#END MODIFICATIONS" above. Anything involving installing/removing packages requires a more sophisticated approach using a chroot cage as described in the relevant wiki page, but the rest should remain valid.
    Last edited by pablomme; January 25th, 2009 at 07:36 PM. Reason: Method wouldn't work - bad file permissions in squashfs image.

  5. #5
    Join Date
    Aug 2006
    Beans
    841

    Re: [howto] tweaking a livecd in order to blacklist offending kernel modules

    much cleaner aproach, thanks for the time..

    ive installed intrepid and im having loads of problems in this laptop. have you had the chance to test intrepid out?

    im starting to believe my cdrom might be on its way out and some files didnt copy correctly.

  6. #6
    Join Date
    May 2008
    Beans
    Hidden!
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: [howto] tweaking a livecd in order to blacklist offending kernel modules

    I tried the live CD. The only thing I noticed was that network-manager (and its applet) had failed to start, after which I turned off the computer since there was little I could do without an internet connection..

  7. #7
    Join Date
    Aug 2006
    Beans
    841

    Re: [howto] tweaking a livecd in order to blacklist offending kernel modules

    Quote Originally Posted by pablomme View Post
    I tried the live CD. The only thing I noticed was that network-manager (and its applet) had failed to start, after which I turned off the computer since there was little I could do without an internet connection..
    using the same laptop from the bug report?

    the network manager is of no use. since it needs the rt73usb driver, which isnt as effective as the legacy one from serialmonkey, even if it worked here, i dont use it, just compile the legacy drivers from serialmonkey and use rutilt to configure the wireless connection.

    if thats the only problem you experienced, then i guess formatting and reinstalling with a new cd could prove fruitful...

  8. #8
    Join Date
    May 2008
    Beans
    Hidden!
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: [howto] tweaking a livecd in order to blacklist offending kernel modules

    Same laptop, yeah. I've tried again, this time I had a problem with the X server, so I decided no to trust the CD and go with a memory stick, using Unetbootin - very easy to use.

    The X server problem went away when I booted from the memory stick, but the network-manager one remained.

    Quote Originally Posted by eldragon View Post
    the network manager is of no use. since it needs the rt73usb driver, which isnt as effective as the legacy one from serialmonkey, even if it worked here, i dont use it, just compile the legacy drivers from serialmonkey and use rutilt to configure the wireless connection.
    What do you mean? Why does network-manager need a USB driver?

  9. #9
    Join Date
    Aug 2006
    Beans
    841

    Re: [howto] tweaking a livecd in order to blacklist offending kernel modules

    Quote Originally Posted by pablomme View Post
    Same laptop, yeah. I've tried again, this time I had a problem with the X server, so I decided no to trust the CD and go with a memory stick, using Unetbootin - very easy to use.

    The X server problem went away when I booted from the memory stick, but the network-manager one remained.



    What do you mean? Why does network-manager need a USB driver?

    the ralink wireless adapter in this notebook is actually a usb dongle wired to a usb hub inside the notebook

    anyway, its of no importance. the truth is the included driver for our chispet is pants. it doesnt work as it should, BUT it works with the network manager, something i really wish i could use.

    here, the network manager doesnt die. it works, but wireless signal is less than optimal. so i just blacklist rt73usb, rt2x00lib and and rt2x00usb.

    i download the rt73 legacy driver http://rt2x00.serialmonkey.com/rt73-cvs-daily.tar.gz which works much more consistenly but it isnt supported by the network manager.

    you will need to build the driver but its fairly easy:
    Code:
    $ sudo apt-get install build-essential
    $ make
    $ strip -S rt73.ko
    $ sudo make install
    $ sudo apt-get install rutilt
    execute rutilt to configure your wireless connection

    thats all there is to it. you will find those drivers are much more stable.. yet, less compatible with the new way of doing things.

    ive just installed again with a new cd. and still experiencing the same cpu fan effect. no thermal sensors found, and it spins constantly. arent you experiencing that?

  10. #10
    Join Date
    May 2008
    Beans
    Hidden!
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: [howto] tweaking a livecd in order to blacklist offending kernel modules

    I think our laptops are different, then. Mine has an Intel PRO/Wireless 3945 card.

    I didn't notice any other problems on the laptop, but again my focus was on the network-manager issue, so there may be other broken things and I just didn't realize..

    Your fan problem reminds me of the one time I tried OpenSolaris, whose kernel doesn't have a cpufreq equivalent and the CPU frequency remained at its maximum, with the fan trying to cool it down constantly. Perhaps you should try to force-load the cpufreq module?

    Anyway, between my laptop and my desktop (which suffers from a Radeon driver problem in Intrepid) this is going to be an "interesting" update process..

Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

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