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

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



How have things developed regarding this issue?
I have seen that Chris Lamb has come up with some more patches in order to make the debian-installer detect a USB memory device. Now I have learned how to apply the patches, but after reading you message (quoted below), I am not sure about how to make the patched packages work for me.

I have patched apt-setup, cdrom-detect and debian-installer-utils according to the conversation displayed at
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=498143.

I followed the instructions on
http://people.connexer.com/~roberto/howtos/debcustomize when patching and rebuilding the packages.
Now I have ended up with these files (the result from using pbuilder):

apt-cdrom-setup_0.40_all.udeb
cdrom-detect_1.30.dsc                
di-utils-exit-installer_1.65_all.udeb
apt-mirror-setup_0.40_all.udeb 
cdrom-detect_1.30_i386.changes            
di-utils-mapdevfs_1.65_i386.udeb
apt-setup_0.40.dsc              
cdrom-detect_1.30.tar.gz                  
di-utils-reboot_1.65_all.udeb
apt-setup_0.40_i386.changes     
debian-installer-utils_1.65.dsc          
di-utils-shell_1.65_all.udeb
apt-setup_0.40.tar.gz          
debian-installer-utils_1.65_i386.changes 
di-utils-terminfo_1.65_all.udeb
apt-setup-udeb_0.40_all.udeb   
debian-installer-utils_1.65.tar.gz
cdrom-detect_1.30_all.udeb      
di-utils_1.65_i386.udeb

Could anyone please help me by telling me which files to include where in order to make it possible to do a "live" install from a USB memory device to a hard drive.

Kind regards,
Fredrik Israelsson



---------------

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




      __________________________________________________________
Går det långsamt? Skaffa dig en snabbare bredbandsuppkoppling. 
Sök och jämför priser hos Kelkoo.
http://www.kelkoo.se/c-100015813-bredband.html?partnerId=96914325


Reply to: