Annahme: /sda1 wird /boot im neuen System und hat eine Größe von ca. 200MB
debootstrap
mount /dev/sda1 /mnt debootstrap --arch amd64 sarge /mnt http://amd64.debian.net/debian-amd64/
Um jetzt den Bootloader lilo installieren zu können, muss man die sources.list anpassen.
/etc/apt/sources.list
deb http://amd64.debian.net/debian-amd64/ stable main contrib
Jetzt geht es schnell (im chroot des neuen Systems):
-
rescue:~# chroot /mnt rescue:/# apt-get update Get:1 http://amd64.debian.net stable/main Packages [3223kB] Get:2 http://amd64.debian.net stable/main Release [110B] Get:3 http://amd64.debian.net stable/contrib Packages [44.8kB] Get:4 http://amd64.debian.net stable/contrib Release [113B] Fetched 3268kB in 1s (2994kB/s) Reading Package Lists... Done rescue:/# apt-get install lilo Reading Package Lists... Done Building Dependency Tree... Done The following extra packages will be installed: libdevmapper1.01 Suggested packages: lilo-doc mbr The following NEW packages will be installed: libdevmapper1.01 lilo 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. Need to get 371kB of archives. After unpacking 1229kB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://amd64.debian.net stable/main libdevmapper1.01 2:1.01.00-4 [22.2kB] Get:2 http://amd64.debian.net stable/main lilo 1:22.6.1-6.2 [349kB] Fetched 371kB in 0s (2654kB/s) Preconfiguring packages ... Selecting previously deselected package libdevmapper1.01. (Reading database ... 7509 files and directories currently installed.) Unpacking libdevmapper1.01 (from .../libdevmapper1.01_2%3a1.01.00-4_amd64.deb) ... Selecting previously deselected package lilo. Unpacking lilo (from .../lilo_1%3a22.6.1-6.2_amd64.deb) ... Setting up libdevmapper1.01 (1.01.00-4) ... Creating device-mapper devices...unable to continue without /proc/misc and /proc/devices. Setting up lilo (22.6.1-6.2) ...
Die Dateien für den Boot-Kernel liegen auf der ersten CD und müssen mit auf die Partition.
rhel4/bootimage
mount -o loop RHEL4-U2-x86_64-CD1.iso /mnt mkdir -p /rhel4 cp /mnt/images/pxeboot/* rhel4/ umount /mnt
Jetzt kann der Bootloader angepasst werden.
lilo.conf
boot=/dev/sda
root=/dev/sda1
vga=normal
timeout=60
prompt
lba32
read-only
default=lxinstall
serial=0,57600n8
append="console=ttyS0,57600 console=tty0 panic=30"
image=/rhel4/vmlinuz
label=lxinstall
initrd=/rhel4/initrd.img
append="console=tty0 console=ttyS0,57600 panic=30 askmethod vnc vncpassword=min6zeichen acpi=off"
...und schließlich auch installiert werden.
lilo installieren
rescue:/# lilo -v -C lilo.conf LILO version 22.6.1, Copyright (C) 1992-1998 Werner Almesberger Development beyond version 21 Copyright (C) 1999-2004 John Coffman Released 17-Nov-2004, and compiled at 20:45:01 on Jun 6 2005 Debian GNU/Linux Reading boot sector from /dev/sda Warning: '/proc/partitions' does not exist, disk scan bypassed Using MENU secondary loader Calling map_insert_data Boot image: /rhel4/vmlinuz Mapping RAM disk /rhel4/initrd.img Added lxinstall * Writing boot sector. /boot/boot.0800 exists - no boot sector backup copy made. rescue:/#
Default Boot Image ist nun lxinstall.