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

Re: [RFC] hard drive / usb storage installs



Joey Hess <joeyh@debian.org> writes:

> I am working on making d-i support installs from USB storage. Booting is
> dealt with, but there's still the question of how d-i finds the install
> media to install additional udebs and/or to get debs from. 
> 
> As I thought about this, I realized that once it's mounted, a USB
> storage device is essentially just another hard drive, so the design
> should also allow for installs where a generic hard drive is used as the
> install media. I am also leaning toward getting this to work with any
> iso image that has d-i on it, so I don't have to worry about creating my
> own isos (or other media) too.
> 
> The four scenarios I am envisioning are:
> 
> 1. Download a debian iso to a partition you will not be putting Debian on.
>    "Boot" via a batch file that runs linux. May only work on more
>    antique versions of DOS.

Or removable medium other than cdrom: MO, zip, ...

Downloading the install file to harddisk and installing could be a
very common case. Most systems can boot directly from the host OS.

I like the idea of just downloading the debian.bat, (debian.pif,)
kernel, ramdisk and  normal cdrom.iso and install then. The
boot-floppies had support to install from "already mounted fs" which
was nice.

> 2. Same as #1 except create a floppy image and boot from it.
> 3. Put a debian iso on a USB storage device, and boot from it[0].

You mean a USB storage device with ISO9660 on it? Does that realy
boot? Anyone tried that?

> 4. Boot from a floppy which then detects your USB storage device.

Thats "Same as #3 except ...", right?

> In all cases the d-i initrd that is loaded contains drivers for hard
> disks and usb storage, as well as a udeb (provisionally called
> hd-media-detect) that tries to mount each hard drive and partition in
> turn, and looks for iso files on them[1]. Once the d-i iso is found, it
> loop mounts it to /cdrom, and the rest of the install proceeds more or
> less as normal, using the cdrom-retreiver to pull files from it,
> possibly using a modified version of cdrom-checker to validate it first.
> 
> The only caveat during the install is that it will need to avoid letting
> the user partition the drive from which the iso is loop mounted, or
> format the partition the iso is in. This may call for some changes in
> the partitioner and formating modules.

Isn't that already in there to prevent partitioning/formating already
mounted partitions? It should be. You never know what the user will do
on alt-F2.
 
> Before reboot, for scenario 2, there should probably be something to
> unmount the iso and remind the user that they can unplug their usb
> device now, equivilant to the cd eject code in cdrom-detect.
> 
> -- 
> see shy jo
> 
> [0] I dunno if a straight iso dd'd to usb storage is bootable. This may
>     really involve putting the iso in a partition on the usb device,
>     along with a d-i initrd and kernel, and adding a proper boot loader.

Scan all harddisks and all partitions. If you dd the iso to the drive its
/dev/discs/discX/disc or /partY.

> [1] This would be a two stage scan. In the first stage, just look for
>     *.iso, *.raw[2] in the top level directory. If a d-i iso is not found,
>     go on to the second stage, which runs find on the whole drive. User
>     interaction may or may not be involved, to choose amoung isos.
> [2] If we keep shipping confusingly named ".raw" files.

MfG
        Goswin



Reply to: