Gentoo Archives: gentoo-user

From: Nikos Chantziaras <realnc@×××××.de>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Re: gentoo install on Dell restore partition... live?
Date: Tue, 15 Jul 2008 06:43:57
Message-Id: g5hgun$b4h$1@ger.gmane.org
In Reply to: [gentoo-user] gentoo install on Dell restore partition... live? by Michael Higgins
1 Michael Higgins wrote:
2 > So, I finally got the OK to nuke another Dell winbox. My dream is to:
3 >
4 > * Partition the restore partition (3.6 GB) for any small linux
5 > installation
6 >
7 > * make that partition active, bootable, with grub installed
8 >
9 > * reboot and ssh into that linux machine to finish by toasting NTFS
10 > partition and making it my gentoo system '/' as per usual...
11 >
12 > Can this be done without physical access to the machine which is
13 > currently running windows XP? I am administrator and get 'there' via
14 > RDP.
15
16 It is possible: http://www.gentoo.org/doc/en/altinstall.xml#doc_chap5
17
18 But not really recommended because if you do something wrong (wrong grub
19 config, SSH misconfiguration, etc.) you'll need to go there and get
20 physical access.
21
22 Also, instead of installing a downloaded tarball, you can just clone the
23 existing Gentoo installation into the new partition and boot from it.
24 This usually means:
25
26 'cp -a' your existing / to your target / (except /dev, /sys and /proc).
27 If you mounted your target / as /root/target, you do:
28
29 cp -a /usr /root/hd
30 (repeat this for all directories in your current / *EXCEPT* /dev, /proc,
31 /sys and /lost+found)
32
33 mkdir /root/hd/dev
34 mkdir /root/hd/proc
35 mkdir /root/hd/sys
36 mknod /root/hd/dev/console c 5 1
37 mknod /root/hd/null c 1 3
38 touch /root/hd/dev/.keep
39 touch /root/hd/proc/.keep
40 touch /root/hd/sys/.keep
41
42 Now chroot into it:
43
44 mount -t proc none /root/mnt/proc
45 mount -o bind /dev /mnt/gentoo/dev
46 chroot /root/hd /bin/bash
47
48 Now edit /etc/fstab to use the new partitions, edit /boot/grub/grub.conf
49 and reinstall grub:
50
51 grub
52 root (hd0,0) <-- sustitute with what you really have/want
53 setup
54 quit
55
56 Now change your SSH config to allow for root login! (Or add a normal
57 user if you don't want that.) In any case, check your SSH config.
58
59 You're ready. Leave the chroot and unmount:
60
61 exit
62 umount /root/hd/dev
63 umount /root/hd/proc
64
65 If you've set up grub correctly while in the chroot, you can now reboot
66 and the new system should come up. If not, I hope it's not a long drive
67 or walk to get physical access :P
68
69 --
70 gentoo-user@l.g.o mailing list

Replies

Subject Author
[gentoo-user] Re: gentoo install on Dell restore partition... live? Nikos Chantziaras <realnc@×××××.de>
[gentoo-user] Re: gentoo install on Dell restore partition... live? Nikos Chantziaras <realnc@×××××.de>
Re: [gentoo-user] Re: gentoo install on Dell restore partition... live? Neil Bothwick <neil@××××××××××.uk>