Differences between revisions 3 and 5 (spanning 2 versions)
Revision 3 as of 2009-12-15 23:50:50
Size: 927
Editor: FrBrGeorge
Comment:
Revision 5 as of 2009-12-18 08:39:13
Size: 2845
Editor: FrBrGeorge
Comment:
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
----
==== Загрузка с LiveCD на сервере ====
{{{
[root@localhost ~]# cat /etc/fstab
proc /proc proc nosuid,noexec,gid=proc 0 0
devpts /dev/pts devpts nosuid,noexec,gid=tty,mode=620 0 0
tmpfs /tmp tmpfs nosuid 0 0
/dev/root / auto defaults,ro 0 0
UUID=b391cc0a-59c0-4313-b6f2-31f9096b6ba4 swap swap defaults 0 0
UUID=e40fc352-f031-4827-ab7c-a7ebe12ecc5e /mnt/hda2 ext3 noauto 0 0
UUID=2a86bf2b-5d8c-4c04-9acf-0f47448ea45c /mnt/hda5 ext3 noauto 0 0
UUID=a12e05b3-671f-4914-9d5e-f07cefd2570c /mnt/hda6 ext3 noauto 0 0
}}}

{{{
[root@localhost ~]# mount /mnt/hda5
[root@localhost ~]# ls /mnt/hda5/
adm avahi empty local lost+found nobody resolv srv yp
aquota.group cache ftp lock mail opt run tmp
aquota.user db lib log nis preserve spool www
}}}

{{{
[root@localhost ~]# mount -t squashfs -o loop /image/live /mnt/hda2
[root@localhost ~]# cp -a /mnt/hda2 /mnt/hda5/srv/public/netinst
}}}

{{{
[root@localhost ~]# mkdir /mnt/hda5/srv/public/netinst/livefs
[root@localhost ~]# cd /image
[root@localhost image]# cp -a .??* [^l]* lic* /mnt/hda5/srv/public/netinst/livefs/
}}}

==== Настройка сервера ====
{{{
[root@host-15 ~]# cd /srv/public/netinst/
[root@host-15 netinst]# mv hda2 livefs/live
[root@host-15 netinst]# chmod 755 hda2/
}}}

{{{
[root@host-15 ~]# chroot /srv/public/netinst/livefs/live/
[root@host-15 /]# cat > /etc/rc.d/rc.local
#!/bin/sh
dhcpcd -p eth0
^D
[root@host-15 /]# chmod +x /etc/rc.d/rc.local
[root@host-15 /]# { echo "P@sSw0RD" ; echo "P@sSw0RD" ; } | passwd --stdin root
}}}

Line 16: Line 67:
    * NM_CONTROLLED=no в /etc/net/ifaces/default/options

Сетевая установка и сетевая загрузка


Загрузка с LiveCD на сервере

[root@localhost ~]# cat /etc/fstab
proc            /proc                   proc    nosuid,noexec,gid=proc          0 0
devpts          /dev/pts                devpts  nosuid,noexec,gid=tty,mode=620  0 0
tmpfs           /tmp                    tmpfs   nosuid                          0 0
/dev/root / auto  defaults,ro 0 0
UUID=b391cc0a-59c0-4313-b6f2-31f9096b6ba4       swap    swap    defaults        0      0
UUID=e40fc352-f031-4827-ab7c-a7ebe12ecc5e       /mnt/hda2       ext3    noauto  0      0
UUID=2a86bf2b-5d8c-4c04-9acf-0f47448ea45c       /mnt/hda5       ext3    noauto  0      0
UUID=a12e05b3-671f-4914-9d5e-f07cefd2570c       /mnt/hda6       ext3    noauto  0      0

[root@localhost ~]# mount /mnt/hda5
[root@localhost ~]# ls /mnt/hda5/
adm           avahi  empty  local  lost+found  nobody    resolv  srv  yp
aquota.group  cache  ftp    lock   mail        opt       run     tmp
aquota.user   db     lib    log    nis         preserve  spool   www

[root@localhost ~]# mount -t squashfs -o loop /image/live /mnt/hda2
[root@localhost ~]# cp -a /mnt/hda2 /mnt/hda5/srv/public/netinst

[root@localhost ~]# mkdir /mnt/hda5/srv/public/netinst/livefs
[root@localhost ~]# cd /image
[root@localhost image]# cp -a .??* [^l]* lic* /mnt/hda5/srv/public/netinst/livefs/

Настройка сервера

[root@host-15 ~]# cd /srv/public/netinst/
[root@host-15 netinst]# mv hda2 livefs/live
[root@host-15 netinst]# chmod 755 hda2/

[root@host-15 ~]# chroot /srv/public/netinst/livefs/live/
[root@host-15 /]# cat > /etc/rc.d/rc.local
#!/bin/sh
dhcpcd -p eth0
^D
[root@host-15 /]# chmod +x /etc/rc.d/rc.local
[root@host-15 /]# { echo "P@sSw0RD" ; echo "P@sSw0RD" ; } | passwd --stdin root


LiveCD по сети:

  • Загрузиться с Livecd на сервере
  • смонтировать /image/live на /mnt/sda2
  • смонтировать /mnt/sda5
  • скопировать /mnt/sda2 на /mnt/sda5/srv/public/netinst
  • загрузить сервер
  • создать /srv/public/netinst/livefs
  • скопировать /srv/public/netinst/mnt/* (всё, кроме live и ALTLinux) на /srv/public/netinst/livefs
  • mv /srv/public/netinst/sda2 /srv/public/netinst/livefs/live
  • chroot /srv/public/netinst/livefs
    • chkconfig chkconfig livecd-save-nfs off
    • NM_CONTROLLED=no в /etc/net/ifaces/default/options
    • echo "#!/bin/sh\ndhcpcd eth0" > /etc/rc/rc.local; chmod +x /etc/rc/rc.local

    • установить пароль оута
    • убрать монтирование левых разделов
  • ln -sf livefs current

FrBrGeorge/BookP5/NetworkInstall (last edited 2010-02-16 14:53:32 by FrBrGeorge)