gentoo
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
mount /dev/sda3 /mnt/gentoo
mount /dev/sda1 /mnt/gentoo/boot
chmod 1777 /mnt/gentoo/tmp
mount -t proc proc /mnt/gentoo/proc
mount -rbind /sys /mnt/gentoo/sys
mount -make-rslave /mnt/gentoo/sys
mount -rbind /dev /mnt/gentoo/dev
mount -make-rslave /mnt/gentoo/dev
mount -t tmpfs -o nosuid,nodev,noexec shm /dev/shm
chmod 1777 /dev/shm
chroot /mnt/gentoo /bin/bash
source /etc/profile
export PS1="(chroot) $PS1"
|
the minimal install cds have the ability to run isohybrid on them and then you can dd that image to a removable device.
Code:
# isohybrid image.iso && dd if=image.iso of=/dev/sdb bs=8192k
dmesg
lspci -k
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
|
gentoo dosshd
passwd
#wireless
#http://www.wiloon.com/?p=6008
#start sshd
parted -a optimal /dev/sda
mklabel gpt
unit mib
mkpart primary 1 129
name 1 boot
mkpart primary 129 17536
name 2 swap
mkpart primary 17536 -1
name 3 rootfs
set 1 boot on
quit
#mkfs.vfat /dev/sda1
mkfs.msdos -F 32 /dev/sda1
mkfs.ext4 /dev/sda3
Filesystem UUID: d10a8895-80c5-44ef-be41-edc0bca71c5b
mkswap /dev/sda2
UUID=4d2d7b5c-0d27-4b1d-8e2e-826a3ebb12f4
mount /dev/sda3 /mnt/gentoo
mkdir /mnt/gentoo/boot
mount /dev/sda1 /mnt/gentoo/boot
mkdir /mnt/gentoo/tmp
chmod 1777 /mnt/gentoo/tmp
date
cd /mnt/gentoo
#download stage tarball
tar xvjpf stage3-*.tar.bz2 -xattrs
#Configuring compile options
mirrorselect -i -o >> /mnt/gentoo/etc/portage/make.conf
cp -L /etc/resolv.conf /mnt/gentoo/etc/
mount -t proc proc /mnt/gentoo/proc
mount -rbind /sys /mnt/gentoo/sys
mount -make-rslave /mnt/gentoo/sys
mount -rbind /dev /mnt/gentoo/dev
mount -make-rslave /mnt/gentoo/dev
mount -t tmpfs -o nosuid,nodev,noexec shm /dev/shm
chmod 1777 /dev/shm
chroot /mnt/gentoo /bin/bash
source /etc/profile
export PS1="(chroot) $PS1"
emerge-webrsync
emerge -sync
eselect profile list
eselect profile set 3
nano -w /etc/portage/make.conf
echo "Asia/Shanghai" >/etc/timezone
emerge -config sys-libs/timezone-data
nano -w /etc/locale.gen
locale-gen
eselect locale list
eselect locale set 5
env-update && source /etc/profile
emerge -ask sys-kernel/gentoo-sources
ls -l /usr/src/linux
emerge genkernel
genkernel -install initramfs
ls /boot/initramfs*
nano -w /etc/fstab
emerge -ask sys-kernel/genkernel
genkernel all
ls /boot/kernel\* /boot/initramfs\*
find /lib/modules/4.0.5-gentoo/ -type f -iname '\*.o' -or -iname '\*.ko' | less
emerge -ask sys-kernel/linux-firmware
nano -w /etc/fstab
nano -w /etc/conf.d/hostname
emerge -ask -noreplace net-misc/netifrc
passwd
emerge -ask app-admin/syslog-ng
emerge -ask sys-process/cronie
crontab /etc/crontab
emerge -ask sys-apps/mlocate
nano -w /etc/inittab
emerge -ask net-misc/dhcpcd
nano -w /etc/portage/make.conf
Enable the systemd USE flag globally (in make.conf).
eselect profile list
emerge -avDN @world
#syslinux
#efi
echo sys-boot/syslinux >> /etc/portage/package.keywords
emerge -ask sys-boot/syslinux
mkdir -p /boot/efi/EFI/syslinux
cd /usr/share/syslinux/efi64
cp syslinux.efi ldlinux.e64 menu.c32 libcom32.c32 libutil.c32 /boot/efi/EFI/syslinux
#syslinux, bios
dd bs=440 conv=notrunc count=1 if=/usr/share/syslinux/gptmbr.bin of=/dev/sda
emerge sys-apps/gptfdisk
gdisk /dev/sda
x
a
w
mkdir /boot/extlinux
extlinux -install /boot/extlinux
ln -snf . /boot/boot
cd /usr/share/syslinux
cp menu.c32 memdisk libcom32.c32 libutil.c32 /boot/extlinux
|