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

Bug#694722: eMachines eM355, encrypted & boots off pendrive, preseeding fails



On Thu 29 Nov 2012 at 15:05:24 +0100, Stefan Klinger wrote:

Hello Stefan,

> I intend to have a completely encrypted harddisk and boot off a separate
> pendrive.  apt-cacher on the local network is used to limit network
> load, and I wanted (but failed) to use preseeding.
> 
>     $ curl -OL 'http://ftp.nl.debian.org/debian/dists/testing/main/installer-amd64/current/images/hd-media/boot.img.gz'
>     $ curl -OL 'http://cdimage.debian.org/cdimage/wheezy_di_beta4/amd64/iso-cd/debian-wheezy-DI-b4-amd64-netinst.iso'

[Snip]

> Well, proceed with installation.  First try: Plugged pendrive into
> another machine, and proceedas follows:
> 
>     $ gunzip <boot.img.gz >/dev/sdb
>     $ mount /dev/sdb /media/sdb
>     $ cp debian-wheezy-DI-b4-amd64-netinst.iso /media/sdb
>     $ umount /media/sdb

This works for me.
 
> Plugged into target machine, switched on.  Machine hangs, no boot menu
> visible, just a cursor blinking in the top left corner.
> 
>     $ dd if=/dev/zero of=/dev/sdb    # clean device, cfdisk /dev/sdb failed
>     $ cfdisk /dev/sdb    # create a /dev/sdb1 partition
>     $ gunzip <boot.img.gz >/dev/sdb1 
>     $ mount /dev/sdb1 /media/sdb1
>     $ cp debian-wheezy-DI-b4-amd64-netinst.iso /media/sdb1

This would not work because the MBR is not written to. There is nothing
in it to say how to boot.

> Plugged into target machine, switched on.  This time GRUB bails out,
> saying "error: no such device: 85163fd4-b4w2-43a1-9501-1df805be52ce".
> The rescue mode leaves me pretty clueless.  So I decide to just put the
> installer image on the pendrive:

I think you may have your comments on the two techniques the wrong way
round. Also, it is SYSLINUX which does the booting, not GRUB. Did you
really get a screen with "GRUB" displayed at the top?

>     $ dd if=debian-wheezy-DI-b4-amd64-netinst.iso of=/dev/sdb

This is the recommended way, unless you have some specialised needs. It
is fast and reliable.

> I would really love to be able to skip creation of a non-root user.  I
> have to delete the account anyway, because I change adduser.conf, and
> some groups.  Also, if I just replace the OS, but leave all other data
> intact, I need to match existing UIDs when creating users.

A preseed file with

   d-i passwd/make-user boolean false

should do it. Putting

   passwd/make-user=0

on the kernel commandline definitely does do it.
     
> I have undertaken various attempts to add my `preseed.cfg` to a
> remastered ISO image, following these [1,2] and other instructions.  The
> best I could get was aforementioned GRUB error, maybe the UUID changed.
> 
> So I give up preseeding.  I really like the option to just `dd` an ISO
> image on a pendrive, and install from that.  But obviously it's
> difficult to hand preseeding data to the installer.  Maybe it would make
> sense to allow mounting and accessing an additional device (e.g.,
> another USB pendrive, or another partition on the same pendrive as used
> for installation) via boot parameters, and scan it for preseeding
> information?  Something like
> 
>     auto url=(hd0,1)/path/to/mypreseed.file
> 
> or similar would be cool.  Then one would not have to unpack an ISO
> image, get the right initrd.gz, unpack it as well, add the preseed info
> in the (hopefully) right place, and then repackage everything, getting
> the bootable ISO-image right, and so on...

Put mypreseed.file on a USB pendrive, or on another partition on the
same pendrive as used for installation. Use FAT16. You are going do some
mounting from within the installer.

   mount -tvfat /dev/sdX(n) /mnt

On the kernel commandline have

   file=/mnt/mypreseed.file


Reply to: