Пријава


Да ли сте заборавили лозинку?
prijatelji LUGoNSa
gnu.gif
linuxzasve.jpg
hulk.jpg
zextras_logo.png
 
Налазите се овде: Дом / Uputstva / Gentoo/Exherbo / Gentoo remote install i RAID1

Gentoo remote install i RAID1

аутор: milobit Последња измена 13:54 10.07.2009.
Kako instalirati Gentoo preko neta uz minimalnu pomoć drugara sa druge strane žice

Brze i prljave beleske!

remote
------

Boot minimal amd64 cd
passwd
/etc/init.d/sshd start

local
-----

ssh root@ip_adresa

kad nisi siguran uvek pogledaj u /etc/kernel
koji je cd image stvarno unutra, posto ljudi 
obicno ne slusaju sta im se kaze!

screen -S root

date

date MMDDhhmmYYYY (Month, Day, hour, minute und Year)

lspci

00:00.0 Memory controller: nVidia Corporation CK804 Memory Controller (rev a3)
00:01.0 ISA bridge: nVidia Corporation CK804 ISA Bridge (rev a3)
00:01.1 SMBus: nVidia Corporation CK804 SMBus (rev a2)
00:02.0 USB Controller: nVidia Corporation CK804 USB Controller (rev a2)
00:02.1 USB Controller: nVidia Corporation CK804 USB Controller (rev a3)
00:06.0 IDE interface: nVidia Corporation CK804 IDE (rev f2)
00:07.0 IDE interface: nVidia Corporation CK804 Serial ATA Controller (rev f3)
00:08.0 IDE interface: nVidia Corporation CK804 Serial ATA Controller (rev f3)
00:09.0 PCI bridge: nVidia Corporation CK804 PCI Bridge (rev a2)
00:0e.0 PCI bridge: nVidia Corporation CK804 PCIE Bridge (rev a3)
00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration
00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map
00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller
00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control
00:19.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration
00:19.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map
00:19.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller
00:19.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control
01:07.0 VGA compatible controller: ATI Technologies Inc Rage XL (rev 27)
08:0a.0 PCI bridge: Advanced Micro Devices [AMD] AMD-8131 PCI-X Bridge (rev 12)
08:0a.1 PIC: Advanced Micro Devices [AMD] AMD-8131 PCI-X IOAPIC (rev 01)
08:0b.0 PCI bridge: Advanced Micro Devices [AMD] AMD-8131 PCI-X Bridge (rev 12)
08:0b.1 PIC: Advanced Micro Devices [AMD] AMD-8131 PCI-X IOAPIC (rev 01)
0a:09.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5704 Gigabit Ethernet (rev 03)
0a:09.1 Ethernet controller: Broadcom Corporation NetXtreme BCM5704 Gigabit Ethernet (rev 03)

lspci -n

00:00.0 0580: 10de:005e (rev a3)
00:01.0 0601: 10de:0051 (rev a3)
00:01.1 0c05: 10de:0052 (rev a2)
00:02.0 0c03: 10de:005a (rev a2)
00:02.1 0c03: 10de:005b (rev a3)
00:06.0 0101: 10de:0053 (rev f2)
00:07.0 0101: 10de:0054 (rev f3)
00:08.0 0101: 10de:0055 (rev f3)
00:09.0 0604: 10de:005c (rev a2)
00:0e.0 0604: 10de:005d (rev a3)
00:18.0 0600: 1022:1100
00:18.1 0600: 1022:1101
00:18.2 0600: 1022:1102
00:18.3 0600: 1022:1103
00:19.0 0600: 1022:1100
00:19.1 0600: 1022:1101
00:19.2 0600: 1022:1102
00:19.3 0600: 1022:1103
01:07.0 0300: 1002:4752 (rev 27)
08:0a.0 0604: 1022:7450 (rev 12)
08:0a.1 0800: 1022:7451 (rev 01)
08:0b.0 0604: 1022:7450 (rev 12)
08:0b.1 0800: 1022:7451 (rev 01)
0a:09.0 0200: 14e4:1648 (rev 03)
0a:09.1 0200: 14e4:1648 (rev 03)

^^^ ovaj izlaz se kopira na

http://kmuto.jp/debian/hcl/

^^^ ovu stranicu i ona pokaze koji moduli su ti potrebni u kernelu za tvoj hardware

modprobe raid1

^^^ ukljucuje podrsku za raid1

ovako ce particije da izgledaju:

swap    16Gb   --> md0
/boot   200Mb  --> md1
/       10Gb   --> md2
/home   300Gb  --> md3
/var    20Gb   --> md4
/usr    20Gb   --> md5
/data   123Gb  --> md6

cfdisk /dev/sda

^^^ pravimo particije

sfdisk -d /dev/sda | sfdisk /dev/sdb

^^^ kopira geometriju particaja prvog diska na drugi

sve particije moraju biti tipa fd  (Linux raid autodetect) 

cd /dev && MAKEDEV md

(makedev se nalazi u sys-apps/makedev paketu)

mdadm --create --verbose /dev/md0 --level=1 --raid-devices=2 /dev/sda1 /dev/sdb1

mdadm --create --verbose /dev/md1 --level=1 --raid-devices=2 /dev/sda2 /dev/sdb2

mdadm --create --verbose /dev/md2 --level=1 --raid-devices=2 /dev/sda3 /dev/sdb3

mdadm --create --verbose /dev/md3 --level=1 --raid-devices=2 /dev/sda5 /dev/sdb5

mdadm --create --verbose /dev/md4 --level=1 --raid-devices=2 /dev/sda6 /dev/sdb6

mdadm --create --verbose /dev/md5 --level=1 --raid-devices=2 /dev/sda7 /dev/sdb7

mdadm --create --verbose /dev/md6 --level=1 --raid-devices=2 /dev/sda8 /dev/sdb8


watch -n1 'cat /proc/mdstat'

^^ gledas kako se formirju raid particije

mdadm --detail --scan > /etc/mdadm.conf

mkswap /dev/md0

swapon /dev/md0

mkreiserfs /dev/md1

mkreiserfs /dev/md2

mkreiserfs /dev/md3

mkreiserfs /dev/md4

mkreiserfs /dev/md5

mkreiserfs /dev/md6


mount /dev/md2 /mnt/gentoo

cd /mnt/gentoo

wget http://www.funtoo.org/linux/amd64/funtoo-amd64-2008.02.27/stage3-amd64-2008.02.27.tar.bz2

mkdir boot

mkdir home

mkdir usr

mkdir var

mkdir data

mount /dev/md1 /mnt/gentoo/boot/

mount /dev/md3 /mnt/gentoo/home

mount /dev/md4 /mnt/gentoo/var

mount /dev/md5 /mnt/gentoo/usr

mount /dev/md6 /mnt/gentoo/data

cd /mnt/gentoo

tar -jxvf stage3-amd64-2008.02.27.tar.bz2

wget http://www.funtoo.org/linux/snapshots/portage-2008.03.01.tar.bz2

tar -jxvf portage-2008.03.01.tar.bz2 -C /mnt/gentoo/usr

cp /etc/mdadm.conf /mnt/gentoo/etc/mdadm.conf

^^^^jako vazno zbog raid-a

cp -L /etc/resolv.conf /mnt/gentoo/etc/

mount -t proc none /mnt/gentoo/proc

mount -o bind /dev/ /mnt/gentoo/dev

mount -o bind /dev/pts /mnt/gentoo/dev/pts


cd /


chroot /mnt/gentoo /bin/bash

trenutno problem!

livecd portage # chroot /mnt/gentoo/ /bin/bash
chroot: cannot run command `/bin/bash': Exec format error
livecd portage # 

resenje: pogresan livecd! 32bit-ni za 64bit-nu masinu
Uzimi image za amd64

Kada smo ispravili ovu gresku treba prvo da vratimo raid.

modprobe raid1

/etc/init.d/mdadm start

mdadm --assemble /dev/md0 /dev/sdb1 /dev/sda1

mdadm --assemble /dev/md1 /dev/sdb2 /dev/sda2

mdadm --assemble /dev/md2 /dev/sdb3 /dev/sda3

mdadm --assemble /dev/md3 /dev/sdb5 /dev/sda5

mdadm --assemble /dev/md4 /dev/sdb6 /dev/sda6

mdadm --assemble /dev/md5 /dev/sdb7 /dev/sda7

mdadm --assemble /dev/md6 /dev/sdb8 /dev/sda8

cat /proc/mdstat

^^^ opet je sve tu!

mdadm --detail --scan >> /etc/mdadm.conf

swapon	/dev/md0

mount /dev/md2 /mnt/gentoo
mount /dev/md1 /mnt/gentoo/boot/
mount /dev/md3 /mnt/gentoo/home
mount /dev/md4 /mnt/gentoo/var
mount /dev/md5 /mnt/gentoo/usr
mount /dev/md6 /mnt/gentoo/data


mount -t proc none /mnt/gentoo/proc

mount -o bind /dev/ /mnt/gentoo/dev

mount -o bind /dev/pts /mnt/gentoo/dev/pts


cd /

chroot /mnt/gentoo /bin/bash

env-update && source /etc/profile

export PS1="(chroot) $PS1"

emerge --sync

nano /etc/make.conf

nano -w /etc/locale.gen

emerge -av mdadm

etc-update

mdadm --detail --scan >> /etc/mdadm.conf

rc-update add mdadm boot

emerge -av portage

emerge -av gentoo-sources

cd /usr/src/linux

make menuconfig

make && make modules_install

cp arch/x86_64/boot/bzImage /boot/bzImage

cd /etc/

nano -w fstab

/dev/md0        none            swap            sw              0 0
/dev/md1        /boot           reiserfs      defaults          0 1
/dev/md2        /               reiserfs      defaults          0 1
/dev/md3        /home           reiserfs      defaults          0 1
/dev/md4        /var            reiserfs      defaults          0 1
/dev/md5        /usr            reiserfs      defaults          0 1
/dev/md6        /data           reiserfs      defaults          0 1
none            /proc           proc          defaults          0 0
shm             /dev/shm        tmpfs         defaults          0 0


emerge -av grub

grub

grub> find /boot/grub/stage1
find /boot/grub/stage1
 (hd0,1)
 (hd1,1)
grub>

grub> device (hd0) /dev/sda
device (hd0) /dev/sda
grub>

grub> root (hd0,1)
root (hd0,1)
Filesystem type is reiserfs, partition type 0xfd

grub> setup (hd0)
setup (hd0)
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/reiserfs_stage1_5" exists... yes
Running "embed /boot/grub/reiserfs_stage1_5 (hd0)"...  22 sectors are
embedded.
succeeded
Running "install /boot/grub/stage1 (hd0) (hd0)1+22 p
(hd0,1)/boot/grub/stage2 /boot/grub/menu.lst"... succeeded
Done.

grub> device (hd1) /dev/sdb
device (hd1) /dev/sdb
grub>

root (hd1,1)
Filesystem type is reiserfs, partition type 0xfd
grub>

grub> setup (hd1)
setup (hd1)
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/reiserfs_stage1_5" exists... yes
Running "embed /boot/grub/reiserfs_stage1_5 (hd1)"...  22 sectors are
embedded.
succeeded
Running "install /boot/grub/stage1 (hd1) (hd1)1+22 p
(hd1,1)/boot/grub/stage2 /boot/grub/menu.lst"... succeeded
Done.
grub>

grub> quit
quit
(chroot) livecd etc #

grep -v rootfs /proc/mounts > /etc/mtab

nano /boot/grub/grub.conf

default 0 
timeout 10
fallback 1
splashimage=(hd0,1)/grub/splash.xpm.gz

title=Gentoo
root (hd0,1)
kernel /boot/bzImage root=/dev/md2 


title=Gentoo
root (hd1,1)
kernel /boot/bzImage root=/dev/md2


^^^ U slucaju da crkne jedan disk sa drugog
moze da se butuje linux normalno jer je grub
instaliran u mbr na oba diska.

nano -w /etc/conf.d/hostname

nano -w /etc/conf.d/net

config_eth0=( "dhcpcd" )

emerge -av  dhcpcd

rc-update add net.eth0 default

nano -w /etc/conf.d/keymaps

nano -w /etc/conf.d/clock

emerge -av reiserfsprogs

emerge -av syslog-ng

rc-update add syslog-ng default

emerge -av vixie-cron

rc-update add vixie-cron default

rc-update add sshd default

passwd

reboot

Дејства на документ

« aвгуст 2022 »
aвгуст
поутсрчепесуне
1234567
891011121314
15161718192021
22232425262728
293031
lugons projekti

bal2con

Kako postati haker

tor.lugons.png

slackbook.png

gentoo_handbook

machine

BARBOSSA