[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Debian-live USB problem (bugs #498143 + #510280)



Quoting David Watson:

"Quoting David Watson <david@honeynet.org.uk>:


    Daniel Baumann wrote:

            I'm more than happy to test this patch (or alternative methods) on a
            variety of platforms, but I can't quite seem to come up
with a working
            solution from the various pre-lenny emails about this issue on the
            mailist, so any advice on the best approach to a
workaround for these
            bugs on Lenny is would be much appreciated. Basically I'm
looking for a
            solution to installing to HD from USB media.

        well, it's straight forward - you rebuild the udeb from source with the
        patch from the applied to the source-tree, make sure your version number
        is higher than the one that is present in lenny.

        however, it's stupid to do that all the time (the udeb rebuild),
        therefore i've uploaded a fixed package here:

        http://live.debian.net/other/cdrom-detect-bugfix/

        fetch the udeb, put it into config/binary_local-udebs and eventually
        rebuild the live image.

    Hi Daniel,

    Thanks for the quick turnaround and patched udeb. I've managed to build
    my own package too, but unfortunately placing either your or my patched
    udeb in config/binary_local-udebs and rebuilding the live image doesn't
    appear to update the actual cdrom-detect code run by the Debian
    Installer (ie /var/lib/dpkg/info/cdrom-detect.postinstall remains the
    same as the unpatched v1.30 code). Does the current lenny version of
    live-helper definitely support importing local udebs from
    config/binary_local-udebs (v 1.0.3-2)? Can anyone confirm if this method
    of importing local udebs works for them?

    I'll try hacking the patched code into the newly generated image
    directly to check if the updated cdrom-detect functionality works.

To follow up on my own mail, it appears that the problem is that
although the patched cdrom-detect udeb is imported onto the newly
generated USB image, the initrd image used by the Debian Installer
does not use the patched code.

Files present on disk after rebuilding the image with Daniel's patch:

./cache/packages_debian-installer.udeb/cdrom-detect_1.30_all.udeb
./config/binary_local-udebs/cdrom-detect_1.30+live1_all.udeb
./binary/pool/main/c/cdrom-detect
./binary/pool/main/c/cdrom-detect/cdrom-detect_1.30+live1_all.udeb

The ./binary.list file contains:

/pool/main/c/cdrom-detect
/pool/main/c/cdrom-detect/cdrom-detect_1.30+live1_all.udeb

and ./binary/dists/lenny/main/debian-installer/binary-i386/Packages contains:

Package: cdrom-detect
Priority: optional
Section: debian-installer
Installed-Size: 268
Maintainer: Debian Install System Team <debian-boot@lists.debian.org>
Architecture: all
Version: 1.30+live1
Depends: cdebconf-udeb, hw-detect, di-utils (>= 1.48)
Filename: pool/main/c/cdrom-detect/cdrom-detect_1.30+live1_all.udeb
Size: 87388
MD5sum: 613f331892aa5b0121cfd4ec4aa2bc20
SHA1: 457f4b8864219dafd4b4fe51bd9722740dc778c5
SHA256: 63036af02431e6fefb722b88b9785b97b17f3096f89b0048efa8b63449db2733
Description: Detect CDROM devices and mount the CD
Installer-Menu-Item: 1300


So the patched udeb appears to be imported correctly from the
config/binary_local-udebs directory. However, the Debian Installer
still fails to detect the USB media.

I've hacked installation to hard drive from USB key locally by
manually patching the cdrom-detect postinstall code inside the Debian
Installer's initrd image too. To do this I had to do the following
extra steps:

mkdir temp1
cd temp1

wget http://live.debian.net/other/cdrom-detect-bugfix/cdrom-detect_1.30+live1_all.udeb

dpkg -e cdrom-detect_1.30+live1_all.udeb
cd ..

mkdir temp2
cd temp2/
zcat <workingdirector>/binary/install/initrd.gz | cpio -iv
cp ../temp1/DEBIAN/postinst ./var/lib/dpkg/info/cdrom-detect.postinst
find . -print0 | cpio -0 -H newc -ov | gzip -c > ../initrd-new.gz

cd ..
cp initrd-new.tgz <workingdirector>/binary/install/initrd.gz

and then re-make the USB image.


This produces as working USB key to hard disk installation process,
although the Debian Installer throws an error during the install
process shortly before the end, when it apparently tries to change
media and fails. You can continue the installation by hitting return
with any obvious ill effects, and I'm not sure what causes this yet
(since the ISO version installs cleanly with the same files within the
disk image and no media changes).

This may be a fairly hacky solution and not the correct way to really
solve the problem of USB to HD installs in Debian Live, so any
feedback appreciated.

Thanks,

David"

Hi!
I am trying this out, but I am having problems rebuilding the USB
image. I am trying to use /usr/bin/lh_binary_usb-hdd for this, but it
does not seem to be the tool I should use. Could you please tell me
how to rebuild the image from this stage. I am assuming that using
lh_build would overwrite my changes.

Regards,
Fredrik Israelsson


Reply to: