HOWTO_Remote_Installation_RAID1
Intro
This is a step by step of what I did to install gentoo remotely from a running debian.
I want my disks to use software RAID1 so I will be installing gentoo on the second disk (sdb) and set it up as a degraded RAID.
This was written on the fly and I realise it's messy and maybe not the best way of doing things... but it works. Feel free to edit or comment.
No disrespect to debian by the way, just that I had worked a lot with gentoo and didn't want to do it all over again.
--ecosta 23:23, 25 January 2007 (UTC)
Current setup
Software
Debian sarge minimal install on sda.
| File: /boot/grub/menu.lst |
timeout 5 default 0 color cyan/blue white/blue title Debian GNU/Linux, kernel 2.6.8-3-386 root (hd0,0) kernel /vmlinuz-2.6.8-3-386 root=/dev/sda3 ro initrd /initrd.img-2.6.8-3-386 savedefault boot title Debian GNU/Linux, kernel 2.6.8-3-386 (recovery mode) lock root (hd0,0) kernel /vmlinuz-2.6.8-3-386 root=/dev/sda3 ro single initrd /initrd.img-2.6.8-3-386 savedefault boot title Debian GNU/Linux, kernel memtest86+ root (hd0,0) kernel /memtest86+.bin boot |
Hardware
Specs
| File: Box specs |
2 x Intel(R) Xeon(TM) CPU 3.00GHz 2 x 512 RAM 2 x 160 GB SATA (WDC WD1600JS-75N) 2 x NIC (Intel(R) PRO/1000 Network Connection) |
| File: Hardware details |
0000:00:00.0 Host bridge: Intel Corp. Server Memory Controller Hub (rev 09) 0000:00:02.0 PCI bridge: Intel Corp. Memory Controller Hub PCI Express Port A0 (rev 09) 0000:00:1d.0 USB Controller: Intel Corp. 82801EB/ER (ICH5/ICH5R) USB UHCI #1 (rev 02) 0000:00:1d.1 USB Controller: Intel Corp. 82801EB/ER (ICH5/ICH5R) USB UHCI #2 (rev 02) 0000:00:1d.7 USB Controller: Intel Corp. 82801EB/ER (ICH5/ICH5R) USB2 EHCI Controller (rev 02) 0000:00:1e.0 PCI bridge: Intel Corp. 82801 PCI Bridge (rev c2) 0000:00:1f.0 ISA bridge: Intel Corp. 82801EB/ER (ICH5/ICH5R) LPC Bridge (rev 02) 0000:00:1f.1 IDE interface: Intel Corp. 82801EB/ER (ICH5/ICH5R) Ultra ATA 100 Storage Controller (rev 02) 0000:00:1f.2 IDE interface: Intel Corp. 82801EB (ICH5) Serial ATA 150 Storage Controller (rev 02) 0000:01:00.0 PCI bridge: Intel Corp. PCI Bridge Hub A (rev 09) 0000:01:00.2 PCI bridge: Intel Corp. PCI Bridge Hub B (rev 09) 0000:02:04.0 Ethernet controller: Intel Corp. 82541GI/PI Gigabit Ethernet Controller (rev 05) 0000:04:03.0 Ethernet controller: Intel Corp. 82541GI/PI Gigabit Ethernet Controller (rev 05) 0000:04:0d.0 VGA compatible controller: ATI Technologies Inc Radeon RV100 QY [Radeon 7000/VE] |
disks
Only sda is being used. sdb is free.
| Code: fdisk |
# df -h Filesystem Size Used Avail Use% Mounted on /dev/sda3 146G 337M 138G 1% / tmpfs 443M 4.0K 443M 1% /dev/shm /dev/sda1 487M 15M 447M 4% /boot |
The Plan
The aim is to
- Install gentoo onto sdb
- Boot into gentoo
- Mirror sda with contents of sdb (gentoo)
- emerge -e world
Installation of gentoo
Prepare the RAID
Prepare gentoo to be installed on a degraded RAID1.
load RAID module
| Code: load raid1 module and check |
# modprobe raid1 # lsmod | grep raid raid1 16000 0 md 44744 1 raid1 |
prepare the disk for the RAID
| Code: fdisk |
# fdisk -l /dev/sdb Disk /dev/sdb: 160.0 GB, 160000000000 bytes 255 heads, 63 sectors/track, 19452 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdb1 * 1 13 104391 fd Linux raid autodetect /dev/sdb2 14 136 987997+ fd Linux raid autodetect /dev/sdb3 137 380 1959930 fd Linux raid autodetect /dev/sdb4 381 19452 153195840 5 Extended /dev/sdb5 381 503 987966 fd Linux raid autodetect /dev/sdb6 504 990 3911796 fd Linux raid autodetect /dev/sdb7 991 1173 1469916 fd Linux raid autodetect /dev/sdb8 1174 1235 497983+ fd Linux raid autodetect /dev/sdb9 1236 19452 146328021 fd Linux raid autodetect |
Build the RAID
We have to create a RAID in a degraded form so that we can install gentoo on the RAID without losing debian.
RAID partitions start with md0 and go up one each time. I have seen this leading to errors with partitions eg: md3 is really /dev/sdb5. So to avoid this, I will name the RAID devices the same as the partitions. So /dev/md5 = /dev/sdb5
install mdadm
Install mdadm if you don't already have it:
| Code: Install mdadm |
# apt-cache search mdadm mdadm - Manage MD devices aka Linux Software Raid mdctl - Dummy package for transition to 'mdadm'. raidtools2 - transitional dummy package that can safely be removed # apt-get install mdadm |
Create the devices for the RAID
| Code: Create RAID devices |
# mkdir /dev/md # for i in 1 2 3 5 6 7 8 9; do mknod /dev/md/$i b 9 $i; ln -s /dev/md/$i /dev/md$i; done |
Create the degraded RAID
| Code: Create degraded RAID1 |
# for i in 1 2 3 5 6 7 8 9; do mdadm --create /dev/md$i --level=1 --raid-devices=2 missing /dev/sdb$i; done mdadm: array /dev/md1 started. mdadm: array /dev/md2 started. mdadm: array /dev/md3 started. mdadm: array /dev/md5 started. mdadm: array /dev/md6 started. mdadm: array /dev/md7 started. mdadm: array /dev/md8 started. mdadm: array /dev/md9 started. |
check the status of the RAID
check the status of the RAID as a whole...
| Code: /proc/mdstat |
# cat /proc/mdstat
Personalities : [raid1]
md1 : active raid1 sdb1[1]
104320 blocks [2/1] [_U]
[...]
|
... and for more detail:
| Code: mdadm |
# mdadm --detail /dev/md1
/dev/md1:
Version : 00.90.01
Creation Time : Wed Jan 24 10:51:39 2007
Raid Level : raid1
Array Size : 104320 (101.88 MiB 106.82 MB)
Device Size : 104320 (101.88 MiB 106.82 MB)
Raid Devices : 2
Total Devices : 1
Preferred Minor : 1
Persistence : Superblock is persistent
Update Time : Wed Jan 24 10:51:39 2007
State : clean, degraded
Active Devices : 1
Working Devices : 1
Failed Devices : 0
Spare Devices : 0
UUID : 3165639b:c92abf3c:72f0f2b7:767fc1fd
Events : 0.1
Number Major Minor RaidDevice State
0 0 0 - removed
1 8 17 1 active sync /dev/.static/dev/sdb1
|
Generate configuration file
We will just copy the config file to a safe place for when we chroot into gentoo
| Code: mdadm |
# mdadm --detail --scan >> ~/mdadm.conf |
Create SWAP and file systems
swap
Create and activate swap.
| Code: mkswap |
# mkswap /dev/md3 # swapon /dev/md3 |
ext2
| Code: mke2fs |
# mke2fs /dev/md1 |
ext3
| Code: mke2fs |
# for i in 2 5 6 7 8 9; do mke2fs -j /dev/md$i; done |
Pre Chroot
Time to get started with gentoo's installation.
mount RAID devices
| Code: mount |
# mkdir /mnt/gentoo
# mount -t ext3 /dev/md2 /mnt/gentoo/
# mkdir /mnt/gentoo/{boot,usr,home,var,tmp}
# mount -t ext2 /dev/md1 /mnt/gentoo/boot
# mount -t ext3 /dev/md5 /mnt/gentoo/home
# mount -t ext3 /dev/md6 /mnt/gentoo/usr
# mount -t ext3 /dev/md7 /mnt/gentoo/var
# mkdir /mnt/gentoo/var/backups
# mount -t ext3 /dev/md8 /mnt/gentoo/tmp
# mount -t ext3 /dev/md9 /mnt/gentoo/var/backups
# cd /mnt/gentoo
|
Stage3 and portage tarball
Download stage3 and the portage snapshot.
| Code: extract stage3 |
# wget ftp://mirror.utdlug.org/linux/distributions/gentoo/releases/x86/2006.1/stages/stage3-i686-2006.1.tar.bz2 # wget ftp://mirror.utdlug.org/linux/distributions/gentoo/releases/x86/2006.1/stages/stage3-i686-2006.1.tar.bz2.DIGESTS # md5sum -vc stage3-i686-2006.1.tar.bz2.DIGESTS stage3-i686-2006.1.tar.bz2 OK # tar xvjpf stage3-i686-2006.1.tar.bz2 |
| Code: extract portage |
# wget ftp://mirror.utdlug.org/linux/distributions/gentoo/snapshots/portage-latest.tar.bz2 # wget ftp://mirror.utdlug.org/linux/distributions/gentoo/snapshots/portage-latest.tar.bz2.md5sum # md5sum -vc portage-latest.tar.bz2.md5sum portage-latest.tar.bz2 OK # tar xvjf /mnt/gentoo/portage-latest.tar.bz2 -C /mnt/gentoo/usr |
Better safe than sorry
round about now would be a good idea to install screen so that if anything happens to the internet link, we don't lose all that hard work :)
| Code: screen |
# apt-get install screen |
make.conf
rather than going over it again and again, I'll just setup the make.conf file once and for all.
| File: /mnt/gentoo/etc/make.conf |
# Tuned
#CHOST="i686-pc-linux-gnu"
#CFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer"
#CXXFLAGS="${CFLAGS}"
# Default
CFLAGS="-O2 -march=i686 -pipe"
CHOST="i686-pc-linux-gnu"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j5"
USE="-X -gtk -ipv6 mysql logrotate unicode"
GENTOO_MIRRORS="ftp://ftp.gtlib.gatech.edu/pub/gentoo http://mirror.phy.olemiss.edu/mirror/gentoo http://gentoo.cites.uiuc.edu/pub/gentoo/ ftp://gentoo.cites.uiuc.edu/pub/gentoo/
http://mirror.utdlug.org/linux/distributions/gentoo/ ftp://mirror.utdlug.org/linux/distributions/gentoo/ "
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
LINGUAS="en fr"
FEATURES="-sandbox parallel-fetch"
PORT_LOGDIR="/var/log/portage/elog"
PORTAGE_ELOG_CLASSES="warn error log"
PORTAGE_ELOG_SYSTEM="save"
|
and create the path for the logs
| Code: /mnt/gentoo/var/log/portage/elog |
# mkdir -p /mnt/gentoo/var/log/portage/elog |
Chroot
At this point I got an error when running chroot which said: FATAL: kernel too old. If you get this error, you will need to upgrade your kernel to a newer version. I have added details of this procedure in troubleshooting
| Code: chroot |
# cp -L /etc/resolv.conf /mnt/gentoo/etc/resolv.conf # cp -L ~/mdadm.conf /mnt/gentoo/etc # mount -t proc none /mnt/gentoo/proc # mount -o bind /dev /mnt/gentoo/dev # cd / # chroot /mnt/gentoo /bin/bash / # env-update >>> Regenerating /etc/ld.so.cache... / # source /etc/profile / # export PS1="(chroot) $PS1" (chroot) / # |
create RAID devices
Make sure the devices are presend (/dev/md*). If not, recreate them as you did above.
sync the portage tree
| Code: sync portage |
(chroot) / # emerge --sync |
locales
I added the following to /etc/locale.gen but you probably don't need this
| File: locale.gen |
en_US.UTF-8 UTF-8 en_US ISO-8859-1 fr_FR.UTF-8 UTF-8 fr_FR ISO-8859-1 fr_FR@euro ISO-8859-15 |
| Code: generate locale |
(chroot) / # locale-gen |
timezone
Set the timezone.
| Code: timezone |
(chroot) ~ # cp /usr/share/zoneinfo/US/Central /etc/localtime |
Setup the kernel
You are going to have to be extra careful here! If it doesn't boot, your stuffed.
| Code: install kernel sources |
(chroot) ~ # emerge gentoo-sources |
debian kernel setup
If you had a problem with the debian kernel and had to update it, you can use the .config file you generated for gentoo!
from debian (not chroot)
| Code: copy kernel settings |
# cp /usr/src/linux/.config /mnt/gentoo/usr/src/linux |
Configure the kernel
| Code: Configure |
(chroot) linux # make oldconfig (chroot) linux # make menuconfig |
Compile the kernel
| Code: Compile |
(chroot) linux # make && make modules_install install |
Setup fstab
| Code: |
# <fs> <mountpoint> <type> <opts> <dump/pass> /dev/md1 /boot ext2 noauto,noatime 1 2 /dev/md2 / ext3 noatime 0 1 /dev/md3 none swap sw 0 0 /dev/md5 /home ext3 defaults,noexec,nosuid 0 1 /dev/md6 /usr ext3 defaults 0 1 /dev/md7 /var ext3 defaults 0 1 /dev/md8 /tmp ext3 defaults,noexec,nosuid 0 1 /dev/md9 /var/backups ext3 defaults,noexec,nosuid 1 2 proc /proc proc defaults 0 0 shm /dev/shm tmpf snodev,nosuid,noexec 0 0 |
Setup network information
| Code: network info |
(chroot) linux # nano -w /etc/conf.d/hostname (chroot) linux # nano -w /etc/conf.d/net (chroot) linux # rc-update add net.eth0 default |
Set password
| Code: passwd |
(chroot) linux # passwd |
Environment configs
| Code: env config |
(chroot) linux # nano -w /etc/rc.conf (chroot) linux # nano -w /etc/conf.d/clock |
| Code: install needed packages |
(chroot) linux # emerge syslog-ng && rc-update add syslog-ng default (chroot) linux # emerge vixie-cron && rc-update add vixie-cron default (chroot) linux # rc-update add sshd default (chroot) linux # emerge -av mdadm grub |
Grub installation=
We have to make sure we are not going to overwrite the mbr on sda!
grub.conf
I'm not sure what grub.conf the boot loader will read, I suspect the debian one, but if I am wrong, I'd like it to find an entry so I duplicated the entry in grub.conf, for now.
| File: /boot/grub/grub.conf |
timeout 3 default 0 fallback 1 title Linux Gentoo 2.6.18-r6 - 1st kernel root (hd1,0) kernel /vmlinuz-2.6.18-gentoo-r6 ro root=/dev/md2 title Linux Gentoo 2.6.18-r6 - 1st kernel root (hd1,0) kernel /vmlinuz-2.6.18-gentoo-r6 ro root=/dev/md2 |
File system preparation
| Code: mtab |
(chroot) linux # grep -v rootfs /proc/mounts > /etc/mtab |
Write MBR
| Code: grub on mbr |
(chroot) linux # grub --no-floppy grub> device (hd1) /dev/sdb grub> root (hd1,0) Filesystem type is ext2fs, partition type 0xfd grub> setup (hd1) Checking if "/boot/grub/stage1" exists... yes Checking if "/boot/grub/stage2" exists... yes Checking if "/boot/grub/e2fs_stage1_5" exists... yes Running "embed /boot/grub/e2fs_stage1_5 (hd1)"... 15 sectors are embedded. succeeded Running "install /boot/grub/stage1 (hd1) (hd1)1+15 p (hd1,0)/boot/grub/stage2 /boot/grub/menu.lst"... succeeded Done. grub> quit |
now if I am right, we won't be using the grub from gentoo but the one from debian so we need to add gentoo config to the debian grub.conf
reboot
| Code: exit chroot |
(chroot) linux # exit |
- exit from screen
| Code: unmount gentoo file systems |
# umount /mnt/gentoo/{proc,dev,boot,home,usr,var/backups,var,tmp,.}
|
| Code: reboot using gentoo kernel |
# grub-reboot 1 |
Post Installation
Check OS
| Code: check OS |
$ ssh root@1.2.3.4 # uname -a Linux bu03 2.6.18-gentoo-r6 #3 SMP PREEMPT Thu Jan 25 09:01:05 CST 2007 i686 Intel(R) Xeon(TM) CPU 3.00GHz GNU/Linux |
We are in gentoo... Joy!
Rebuild the RAID
We need to fdisk sda so that it looks identical to sdb. Warning: From here on, if you mess up the box, you are doomed. I did a copy of my working .config file so that in case it does pear shape, I don't have to spend an hour tuening it again.
fdisk sda
fdisk sda and make sure it is identical to sdb!
| Code: compare disks |
# fdisk -l /dev/sd{a,b}
Disk /dev/sda: 160.0 GB, 160000000000 bytes
255 heads, 63 sectors/track, 19452 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 fd Linux raid autodetect
/dev/sda2 14 136 987997+ fd Linux raid autodetect
/dev/sda3 137 380 1959930 fd Linux raid autodetect
/dev/sda4 381 19452 153195840 5 Extended
/dev/sda5 381 503 987966 fd Linux raid autodetect
/dev/sda6 504 990 3911796 fd Linux raid autodetect
/dev/sda7 991 1173 1469916 fd Linux raid autodetect
/dev/sda8 1174 1235 497983+ fd Linux raid autodetect
/dev/sda9 1236 19452 146328021 fd Linux raid autodetect
Disk /dev/sdb: 160.0 GB, 160000000000 bytes
255 heads, 63 sectors/track, 19452 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 13 104391 fd Linux raid autodetect
/dev/sdb2 14 136 987997+ fd Linux raid autodetect
/dev/sdb3 137 380 1959930 fd Linux raid autodetect
/dev/sdb4 381 19452 153195840 5 Extended
/dev/sdb5 381 503 987966 fd Linux raid autodetect
/dev/sdb6 504 990 3911796 fd Linux raid autodetect
/dev/sdb7 991 1173 1469916 fd Linux raid autodetect
/dev/sdb8 1174 1235 497983+ fd Linux raid autodetect
/dev/sdb9 1236 19452 146328021 fd Linux raid autodetect
|
Add sda to the RAID
You might not want to automate this... at your own risk.
| Code: Add sda to RAID1 |
# for i in 1 2 3 5 6 7 8 9; do mdadm /dev/md$i -a /dev/sda$i; done |
Monitor the RAID
| Code: watch |
# watch cat /proc/mdstat |
At the end you should get "UU" on every device which means they are up and running... If you have a "_", something went wrong
This is what you should see once the RAID is in sync:
| Code: mdstat |
# cat /proc/mdstat
Personalities : [raid1]
md1 : active raid1 sda1[0] sdb1[1]
104320 blocks [2/2] [UU]
md2 : active raid1 sda2[0] sdb2[1]
987904 blocks [2/2] [UU]
md3 : active raid1 sda3[0] sdb3[1]
1959808 blocks [2/2] [UU]
md5 : active raid1 sda5[0] sdb5[1]
987840 blocks [2/2] [UU]
md6 : active raid1 sda6[0] sdb6[1]
3911680 blocks [2/2] [UU]
md7 : active raid1 sda7[0] sdb7[1]
1469824 blocks [2/2] [UU]
md8 : active raid1 sda8[0] sdb8[1]
497856 blocks [2/2] [UU]
md9 : active raid1 sda9[0] sdb9[1]
146327936 blocks [2/2] [UU]
unused devices: <none>
|
Reconfigure grub
Let's make sure we have grub setup on the mbr of both disks. This way we can boot from either disk in case of failure.
We should also have two entries in grub.conf... one for each disk
grub setup
| Code: grub |
# grub --no-floppy grub> device (hd0) /dev/sda grub> root (hd0,0) Filesystem type is ext2fs, partition type 0xfd grub> setup (hd0) Checking if "/boot/grub/stage1" exists... yes Checking if "/boot/grub/stage2" exists... yes Checking if "/boot/grub/e2fs_stage1_5" exists... yes Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... 15 sectors are embedded. succeeded Running "install /boot/grub/stage1 (hd0) (hd0)1+15 p (hd0,0)/boot/grub/stage2 /boot/grub/menu.lst"... succeeded Done. grub> device (hd1) /dev/sdb grub> root (hd1,0) Filesystem type is ext2fs, partition type 0xfd grub> setup (hd1) Checking if "/boot/grub/stage1" exists... yes Checking if "/boot/grub/stage2" exists... yes Checking if "/boot/grub/e2fs_stage1_5" exists... yes Running "embed /boot/grub/e2fs_stage1_5 (hd1)"... 15 sectors are embedded. succeeded Running "install /boot/grub/stage1 (hd1) (hd1)1+15 p (hd1,0)/boot/grub/stage2 /boot/grub/menu.lst"... succeeded Done. grub> quit |
grub.conf
| File: /boot/grub/grub.conf |
# cat /boot/grub/grub.conf timeout 3 default 0 fallback 1 title Linux Gentoo 2.6.18-r6 - 1st kernel root (hd1,0) kernel /vmlinuz-2.6.18-gentoo-r ro root=/dev/md2 title Linux Gentoo 2.6.18-r6 - 1st kernel root (hd0,0) kernel /vmlinuz-2.6.18-gentoo-r ro root=/dev/md2 |
boot
Let's see if it boots of sda (hd0)
No grub-reboot under gentoo :( Let's see if sdb boot's then swap entries and boot of sda.
| Code: shutdown |
# shutdown -r now |
if it does, try to boot of sda (hd0)
| Code: shutdown |
# shutdown -r now |
if it does, hi five! You have a running gentoo fully mirrored.
Final step
Now that you have a working RAID, please monitor it ;)
Add the following in: /etc/conf.d/local.start
| Code: monitor |
/sbin/mdadm --monitor --mail=your@email.com --syslog --delay=1800 --daemonise --pid-file=/var/run/mdmonitor.pid /dev/md1 /dev/md2 /dev/md3 /dev/md5 /dev/md6 /dev/md7 /dev/md8 /dev/md9 &>/dev/null |
now setup your CPU flags and emerge -e world
voila!
Troubleshooting
If you had the error FATAL: kernel too old, you will have to upgrade your kernel and go over a few steps again. This is what I had to do.
| Code: prepare chroot |
# cp -L /etc/resolv.conf /mnt/gentoo/etc/resolv.conf # cp -L ~/mdadm.conf /mnt/gentoo/etc # mount -t proc none /mnt/gentoo/proc # mount -o bind /dev /mnt/gentoo/dev # cd / # chroot /mnt/gentoo /bin/bash FATAL: kernel too old |
upgrade the kernel
This seems to mean that the kernel can't support the libraries because it's too old so we need to upgrade the kernel (dread).
One positive outcome though! If we can boot with the new debian kernel, we can use the .config file for our own gentoo so we're at least sure the kernel will boot.
Current debian kernel: Linux 2.6.8-3-386 #1 Wed Dec 6 00:38:53 UTC 2006 i686 GNU/Linux
| Code: extract new kernel |
# wget ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.18.6.tar.bz2 # cd /usr/src # tar jxvf ~/linux-2.6.18.6.tar.bz2 # ln -s linux-2.6.18.6 linux # cd linux # cp /boot/config-2.6.8-3-386 ./.config # make oldconfig # cp .config .config.new |
now let's make sure all important kernel parameters are there, ide, chipset, ...
| Code: configure kernel |
# make menuconfig |
I made sure that crucial devices where not set as modules such as sata, ethernet, ...
| Code: install kernel |
# make clean && make && make modules_install install # ls -lrt /boot ... -rw-r--r-- 1 root root 1813084 Jan 24 23:23 vmlinuz-2.6.18.6 lrwxrwxrwx 1 root root 16 Jan 24 23:23 vmlinuz -> vmlinuz-2.6.18.6 -rw-r--r-- 1 root root 947815 Jan 24 23:23 System.map-2.6.18.6 lrwxrwxrwx 1 root root 19 Jan 24 23:23 System.map -> System.map-2.6.18.6 -rw-r--r-- 1 root root 62293 Jan 24 23:23 config-2.6.18.6 lrwxrwxrwx 1 root root 15 Jan 24 23:23 config -> config-2.6.18.6 |
add the following to /boot/grub/menu.lst
| File: menu.lst |
title Debian GNU/Linux, kernel 2.6.18-6-vanilla root (hd0,0) kernel /vmlinuz-2.6.18.6 root=/dev/sda3 ro savedefault boot |
I put it right after the default boot so it will have value 1 for the grub-reboot command!
now exit screen and unmount all your gentoo mounted partitions.
| Code: reboot |
# grub-reboot 1
Probing devices to guess BIOS drives. This may take a long time.
GNU GRUB version 0.95 (640K lower / 3072K upper memory)
[ Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists the possible
completions of a device/filename. ]
grub> savedefault --once --default=1
grub> quit
Do you want to reboot now? [y/N] y
|
After you booted
| Code: post boot |
$ ssh root@1.2.3.4 Password: Last login: Thu Jan 25 04:33:51 2007 # uname -a Linux 2.6.18.6 #1 SMP PREEMPT Wed Jan 24 23:19:34 CST 2007 i686 GNU/Linux |
Oh joy! Now we have to do the following again (refer to above notes)
- load the raid1 module
- create the RAID deices
- reassemble existing degraded RAID
# for i in 1 2 3 5 6 7 8 9; do mdadm --assemble /dev/md$i /dev/sdb$i; done
- mount the RAID devices to /mnt/gentoo
- activate swap (md3)
- copy the new .config file to /mnt/gentoo/root for later use
- screen
- chroot (4.5)
Created by NickStallman.net, Luxury Homes Australia
Real estate agents should be using interactive floor plans and real estate agent tools.
