Skip to content

Commit 859320d

Browse files
committed
old chapter 7 (prob wip) and bash history from chapter 8
1 parent d7bca8b commit 859320d

File tree

2 files changed

+195
-0
lines changed

2 files changed

+195
-0
lines changed

bash_history-chap8

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/bash
2+
3+
4+
tar xf linux-3.2.6.tar.xz
5+
cd linux-3.2.6
6+
make mrproper
7+
make LANG=en_US.UTF-8 LC_ALL= menuconfig
8+
make
9+
make modules_install
10+
cp -v arch/x86_64/boot/bzImage /boot/vmlinuz-3.2.6-lfs-7.1
11+
cp -v System.map /boot/System.map-3.2.6
12+
cp -v .config /boot/config-3.2.6
13+
install -d /usr/share/doc/linux-3.2.6
14+
cp -r Documentation/* /usr/share/doc/linux-3.2.6
15+
cd ..
16+
chown -R 0:0 linux-3.2.6
17+
18+
install -v -m755 -d /etc/modprobe.d
19+
20+
cat > /etc/modprobe.d/usb.conf << "EOF"
21+
install ohci_hcd /sbin/modprobe ehci_hcd ; /sbin/modprobe -i ohci_hcd ; true
22+
install uhci_hcd /sbin/modprobe ehci_hcd ; /sbin/modprobe -i uhci_hcd ; true
23+
24+
EOF
25+
26+
exit

chap7

+169
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,169 @@
1+
#!/bin/bash
2+
3+
for NIC in /sys/class/net/* ; do
4+
INTERFACE=${NIC##*/} udevadm test --action=add $NIC
5+
done
6+
7+
cat /etc/udev/rules.d/70-persistent-net.rules
8+
9+
cd /etc/sysconfig/
10+
11+
cat > ifconfig.eth0 << "EOF"
12+
ONBOOT=yes
13+
IFACE=eth0
14+
SERVICE=ipv4-static
15+
IP=192.168.1.1
16+
GATEWAY=192.168.1.2
17+
PREFIX=24
18+
BROADCAST=192.168.1.255
19+
EOF
20+
21+
cd ..
22+
23+
cat > /etc/resolv.conf << "EOF"
24+
# Begin /etc/resolv.conf
25+
26+
nameserver 10.0.1.1
27+
nameserver 8.8.8.8
28+
29+
# End /etc/resolv.conf
30+
EOF
31+
32+
cat > /etc/hosts << "EOF"
33+
# Begin /etc/hosts
34+
35+
127.0.0.1 localhost
36+
192.168.1.1 lfseth.jjmvi.amd
37+
38+
# End /etc/hosts
39+
EOF
40+
41+
42+
tar xf lfs-bootscripts-20120229.tar.bz2
43+
cd lfs-bootscripts-20120229
44+
make install
45+
cd ..
46+
rm -rf lfs-bootscripts-20120229
47+
48+
49+
50+
cat > /etc/inittab << "EOF"
51+
id:3:initdefault:
52+
53+
si::sysinit:/etc/rc.d/init.d/rc S
54+
55+
10:0:wait:/etc/rc.d/init.d/rc 0
56+
11:S1:wait:/etc/rc.d/init.d/rc 1
57+
12:2:wait:/etc/rc.d/init.d/rc 2
58+
13:3:wait:/etc/rc.d/init.d/rc 3
59+
14:4:wait:/etc/rc.d/init.d/rc 4
60+
15:5:wait:/etc/rc.d/init.d/rc 5
61+
16:6:wait:/etc/rc.d/init.d/rc 6
62+
63+
ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
64+
65+
su:S016:once:/sbin/sulogin
66+
67+
1:2345:respawn:/sbin/agetty --noclear tty1 9600
68+
2:2345:respawn:/sbin/agetty tty2 9600
69+
3:2345:respawn:/sbin/agetty tty3 9600
70+
4:2345:respawn:/sbin/agetty tty4 9600
71+
5:2345:respawn:/sbin/agetty tty5 9600
72+
6:2345:respawn:/sbin/agetty tty6 9600
73+
74+
EOF
75+
76+
echo "HOSTNAME=jjmvi-amd-lfs" > /etc/sysconfig/network
77+
78+
79+
hwclock --localtime --show
80+
81+
cat > /etc/sysconfig/clock << "EOF"
82+
# Begin /etc/sysconfig/clock
83+
84+
UTC=0
85+
86+
# Set this to any options you might need to give to hwclock,
87+
# such as machine hardware clock type for Alphas.
88+
CLOCKPARAMS=
89+
90+
# End /etc/sysconfig/clock
91+
EOF
92+
93+
94+
cat > /etc/sysconfig/console << "EOF"
95+
LOGLEVEL="7"
96+
KEYMAP="us"
97+
FONT="lat1-16 -m 8859-1"
98+
UNICODE="1"
99+
100+
EOF
101+
102+
vi /etc/sysconfig/rc.site
103+
vi /etc/sysconfig/console
104+
locale -a
105+
LC_ALL=en_US.iso88591 locale charmap
106+
LC_ALL=en_US.iso88591 locale lanugage
107+
LC_ALL=ISO-8859-1 locale lanugage
108+
LC_ALL=ISO-8859-1 locale charmap
109+
LC_ALL=en_US.iso88591 locale charmap
110+
LC_ALL=en_US.iso88591 locale lanugage
111+
LC_ALL=en_US locale lanugage
112+
LC_ALL=en_US locale charmap
113+
LC_ALL=en_US.iso88591 locale charmap
114+
LC_ALL=en_US.iso88591 locale language
115+
LC_ALL=en_US.iso88591 locale int_curr_symbol
116+
LC_ALL=en_US.iso88591 locale int_prefix
117+
118+
119+
cat > /etc/profile << "EOF"
120+
export LANG=en_US.ISO-8859-1
121+
122+
EOF
123+
124+
125+
cat > /etc/inputrc << "EOF"
126+
# /Begin /etc/inputrc
127+
128+
set horizontal-scroll-mode Off
129+
130+
set meta-flag On
131+
set input-meta On
132+
133+
set convert-meta Off
134+
135+
set output-meta On
136+
137+
set bell-style none
138+
139+
"\eOd": backward-word
140+
"\eOc": forward-word
141+
142+
"\e[1~": beginning-of-line
143+
"\e[4~": end-of-line
144+
"\e[5~": beginning-of-history
145+
"\e[6~": end-of-history
146+
"\e[3~": delete-char
147+
"\e[2~": quoted-insert
148+
149+
"\eOH": beginning-of-line
150+
"\eOF": end-of-line
151+
152+
"\e[H": beginning-of-line
153+
"\e[F": end-of-line
154+
155+
# End /etc/inputrc
156+
EOF
157+
158+
# NEED TO EDIT /ETC/FSTAB TO OWN SYSTEM/TASTE
159+
cat > /etc/fstab << "EOF"
160+
161+
/dev/<xxx> / <fff> defaults 1 1
162+
/dev/<yyy> swap swap pri=1 0 0
163+
proc /proc proc nosuid,noexec,nodev 0 0
164+
sysfs /sys sysfs nosuid,noexec,nodev 0 0
165+
devpts /dev/pts devpts gid=4,mode=620 0 0
166+
tmpfs /run tmpfs defaults 0 0
167+
devtmpfs /dev devtmpfs mode=0755,nosuid 0 0
168+
169+
EOF

0 commit comments

Comments
 (0)