I've had success installing Etch from a USB stick prepared using
the easy way described in the manual[1], but I've had no luck
with the flexible way.
[1] http://www.debian.org/releases/stable/amd64/ch04s03.html.en
Either the BIOS moves right past the USB stick, not thinking it's
bootable, or I get a single flashing cursor in the upper-left of
the screen. I think the difference between those two might have
to do with whether I tried install-mbr on the USB stick or not.
I want to use the flexible way so I can add a custom deb repository
that's bigger than the default 256MB image. I would be happy with
either a) creating a second partition to hold the repository, or b)
expanding the existing vfat to make more room, but I think the
default boot.img doesn't use any partitions at all, and I'm not sure
if expanding a vfat is even possible. The third obvious choice is to
build a boot.img from scratch using my own preferred size, but when
use the instructions from the manual, I never get a bootable image.
I'm concerned that I might be doing this wrong:
copy the following files from the Debian archives to the stick:
vmlinuz (kernel binary)
initrd.gz (initial ramdisk image)
I've been using the versions here:
http://http.us.debian.org/debian/dists/etch/main/installer-amd64/current/images/hd-media
Are those correct? The instructions are kind of vague.
Thanks,
Nick
--
Bookmark/Search this post with:
custom usb install image
On Sat, Apr 21, 2007 at 04:26:25PM -0500, nicholas wrote:
> I've had success installing Etch from a USB stick prepared using
> the easy way described in the manual[1], but I've had no luck
> with the flexible way.
> [1] http://www.debian.org/releases/stable/amd64/ch04s03.html.en
>
> Either the BIOS moves right past the USB stick, not thinking it's
> bootable, or I get a single flashing cursor in the upper-left of
> the screen. I think the difference between those two might have
> to do with whether I tried install-mbr on the USB stick or not.
I had difficulty when I did this when Etch was pre-RC1. I have a 4G USB
stick. Here's how I did it.
1. get the boot.img file.
2. Use mc.
3. follow the instructions re partitioning as sd*1, type msdos, and
put a vfat -16 (not 12) fs on it.
4. mount the boot.img file with a loop device
5. mount the USB stick.
6. I used mc (so I could see what was happening) to copy everything
from the boot.img file over to the USB stick.
7. Copy your CD of choice over to the USB stick.
8. unmount both.
9. run install-mbr on the stick.
This ensures that the syslinux, syslinux.cfg, the kernel, and the initrd
all get the correct parameters.
If this doesn't work, give us more info:
what you see when you try to boot it
contents of syslinux.cfg
ls -al of the stick.
Good luck,
Doug.
--
custom usb install image
Thanks Doug,
I tried to follow your directions to the letter, except for mc, as I don't
have enough familiarity with it. Here's what I tried:
wget http://http.us.debian.org/debian/dists/etch/main/installer-amd64/current/images/hd-media/boot.img.gz
gunzip boot.img.gz
mount -oloop boot.img /mnt
fdisk /dev/sda # create one 300MB bootable FAT16 partition
mkfs.vfat /dev/sda1
mkdir /target
mount /dev/sda1 /target
(cd /mnt && tar -cpf - .)|(cd /target && tar xpf -)
cp debian-40r0-amd64-businesscard.iso /target
umount /target /mnt
install-mbr /dev/sda
dd if=/dev/sda bs=4096 count=76800 of=boot.img.300MB_doug
file boot.img.300MB_doug # x86 boot sector; partition 1: ID=0x6, active, starthead 1, startsector 63, 594342 sectors
When I reboot with that image on sda, it blinks the cursor three or four
times, then goes to GRUB, which found on the next boot device. If instead
I just do "zcat boot.img.gz >/dev/sda" it works as advertised.
In this case the syslinux.cfg is unchanged from the Debian installer version.
Here's the ls -al:
# ls -al /target/
total 50284
drwxr-xr-x 2 root root 16384 1970-01-01 00:00 .
drwxr-xr-x 24 root root 4096 2007-04-21 22:45 ..
-rwxr-xr-x 1 root root 67 2007-03-10 00:37 boot.txt
-rwxr-xr-x 1 root root 34689024 2007-04-21 23:13 debian-40r0-amd64-businesscard.iso
-rwxr-xr-x 1 root root 62 2007-03-10 00:37 disk.lbl
-rwxr-xr-x 1 root root 568 2007-03-10 00:37 f10.txt
-rwxr-xr-x 1 root root 875 2007-03-10 00:37 f1.txt
-rwxr-xr-x 1 root root 666 2007-03-10 00:37 f2.txt
-rwxr-xr-x 1 root root 780 2007-03-10 00:37 f3.txt
-rwxr-xr-x 1 root root 485 2007-03-10 00:37 f4.txt
-rwxr-xr-x 1 root root 806 2007-03-10 00:37 f5.txt
-rwxr-xr-x 1 root root 1139 2007-03-10 00:37 f6.txt
-rwxr-xr-x 1 root root 916 2007-03-10 00:37 f7.txt
-rwxr-xr-x 1 root root 1102 2007-03-10 00:37 f8.txt
-rwxr-xr-x 1 root root 766 2007-03-10 00:37 f9.txt
-rwxr-xr-x 1 root root 10907891 2007-03-10 00:37 initrdg.gz
-rwxr-xr-x 1 root root 4207113 2007-03-10 00:37 initrd.gz
-rwxr-xr-x 1 root root 9932 2007-03-10 00:37 ldlinux.sys
-rwxr-xr-x 1 root root 1512476 2007-03-10 00:37 linux
-rwxr-xr-x 1 root root 9519 2007-03-10 00:37 splash.rle
-rwxr-xr-x 1 root root 1023 2007-03-10 00:37 syslinux.cfg
#
Thanks,
Nick
--
custom usb install image
On Sat, Apr 21, 2007 at 06:16:25PM -0500, nicholas wrote:
>
> mount -oloop boot.img /mnt
> fdisk /dev/sda # create one 300MB bootable FAT16 partition
> mkfs.vfat /dev/sda1
> mkdir /target
> mount /dev/sda1 /target
> (cd /mnt && tar -cpf - .)|(cd /target && tar xpf -)
{ so this copies everything from the image file to the stick }
however, what happens if you just use cp ?
> cp debian-40r0-amd64-businesscard.iso /target
> umount /target /mnt
> install-mbr /dev/sda
>
> When I reboot with that image on sda, it blinks the cursor three or four
> times, then goes to GRUB, which found on the next boot device. If instead
> I just do "zcat boot.img.gz >/dev/sda" it works as advertised.
>
> In this case the syslinux.cfg is unchanged from the Debian installer
> version.
I don't understand.
I wonder if the mbr isn't finding syslinux on the first partition.
When you just zcat boot.img.gz, does everyting end up in sda or sda1?
If sda, try the long stuff first but wipe out the partition table and go
direct to sda instead of sda1.
Maybe, as you first suggested, you can have two partitions on the stick;
one for the installer and another for an iso.
Good luck,
Doug.
--
custom usb install image
Douglas Allan Tutty said:
> On Sat, Apr 21, 2007 at 06:16:25PM -0500, nicholas wrote:
>>
>> mount -oloop boot.img /mnt
>> fdisk /dev/sda # create one 300MB bootable FAT16 partition
>> mkfs.vfat /dev/sda1
>> mkdir /target
>> mount /dev/sda1 /target
>> (cd /mnt && tar -cpf - .)|(cd /target && tar xpf -)
> { so this copies everything from the image file to the stick }
>
> however, what happens if you just use cp ?
I tried cp instead of tar, with the same result. I confirmed with a diff
that all the files were copied correctly in both cases. The BIOS still
just skips past it in the boot order.
>> In this case the syslinux.cfg is unchanged from the Debian installer
>> version.
>
> I don't understand.
You had asked what was in my syslinux.cfg, but I haven't changed it from
the original that I got from the Debian hd-media/boot.img.
> I wonder if the mbr isn't finding syslinux on the first partition.
Yeah, I'm not sure about that.
> When you just zcat boot.img.gz, does everyting end up in sda or sda1?
> If sda, try the long stuff first but wipe out the partition table and go
> direct to sda instead of sda1.
With zcat the image ends up in /dev/sda, and if I run "fdisk -l /dev/sda"
there isn't a nice set of partition tables, so I figure that it's using
the "whole disk" with no partitions at all. That makes it hard for me to
use the next idea, which I'd otherwise prefer:
> Maybe, as you first suggested, you can have two partitions on the stick;
> one for the installer and another for an iso.
My real hope was that someone would be able to tell me how the boot.img.gz
files on the Debian servers are created. Anyone? Specifically, this is the
image that I've been using:
http://http.us.debian.org/debian/dists/etch/main/installer-amd64/current/images/hd-media/boot.img.gz
Thanks,
Nick
--
SOLVED: custom usb install image
I finally figured out how to make a Debian USB installer image with
a size other than 256MB. This may seem obvious to some, but no one
suggested it when I asked, so here goes:
echo 'deb-src http://ftp.debian.org/debian/ etch main' >>/etc/apt/sources.list
apt-get update
apt-get -y install dpkg-dev
apt-get source debian-installer
cd debian-installer-20070308
dpkg-checkbuilddeps
apt-get install -y debhelper grep-dctrl bc debiandoc-sgml libbogl-dev glibc-pic libslang2-pic \
libnewt-pic genext2fs mklibs mkisofs dosfstools syslinux tofrodos mtools bf-utf-source
dpkg-checkbuilddeps
cd build
sed -i 's/244736/489472/;s/239/478/;s/256/512/' config/amd64/hd-media.cfg
make build_hd-media
zcat dest/hd-media/boot.img > /dev/sda
--
SOLVED: custom usb install image
On Sat, Jun 02, 2007 at 12:04:03PM -0500, nicholas wrote:
> I finally figured out how to make a Debian USB installer image with
> a size other than 256MB. This may seem obvious to some, but no one
> suggested it when I asked, so here goes:
>
> echo 'deb-src http://ftp.debian.org/debian/ etch main'
> >>/etc/apt/sources.list
> apt-get update
> apt-get -y install dpkg-dev
> apt-get source debian-installer
> cd debian-installer-20070308
> dpkg-checkbuilddeps
> apt-get install -y debhelper grep-dctrl bc debiandoc-sgml libbogl-dev
> glibc-pic libslang2-pic \
> libnewt-pic genext2fs mklibs mkisofs dosfstools syslinux tofrodos mtools
> bf-utf-source
> dpkg-checkbuilddeps
> cd build
> sed -i 's/244736/489472/;s/239/478/;s/256/512/' config/amd64/hd-media.cfg
> make build_hd-media
> zcat dest/hd-media/boot.img > /dev/sda
Wow that's long and involved. I just create the partition like the
long-instructions in the manual, mount it, mount the boot.img file, and
copy the contents to the new using mc. Then run the mbr program
(whatever it's called) to make the USB bootable. Don't need any -dev
stuff, or anything, just the dosfs (to make the vfat filesystem) and the
mbr program.
Doug.
--