Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Desktop in die initrd packen
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
o5i
n00b
n00b


Joined: 16 Feb 2013
Posts: 14
Location: Da Haym

PostPosted: Mon Sep 16, 2013 7:07 pm    Post subject: Desktop in die initrd packen Reply with quote

Hallo

Ich möchte gerne das gesamte System readonly vom Server über http in den Ram laden, weil ich genug davon habe und so gleich mehrere PCs im Netzwerk das gleiche image booten könnten.. Ich habe leider keinen plan was da am besten funktionieren würde. Ich dachte mir dass wenn ich sowiso eine initrd lade, doch alles in die reinpacken könnte. Alternativ wäre ein filesystem.sqashfs interesant...
Enthalten sollte eine grafische Oberfläche n paar Tools usw. 0815 Desktop eben...
Gibts da schon n gutes how to oder so?
mfg
Back to top
View user's profile Send private message
musv
Advocate
Advocate


Joined: 01 Dec 2002
Posts: 3333
Location: de

PostPosted: Mon Sep 16, 2013 10:01 pm    Post subject: Reply with quote

https://wiki.gentoo.org/wiki/Diskless_nodes

Hab's nicht ausprobiert.
Back to top
View user's profile Send private message
o5i
n00b
n00b


Joined: 16 Feb 2013
Posts: 14
Location: Da Haym

PostPosted: Tue Sep 17, 2013 9:26 am    Post subject: Reply with quote

Hallo

Hab mirs angeschaut..
Die Slaves da mounten den root ordner aber rw über nfs...
Genau da liegt mein Problem, ich mächte ein immage über http ziehen ohne irgendwelche nfs ordner zu mounten, weil das dann wiederum sehr bremst...
mfg
Back to top
View user's profile Send private message
py-ro
Veteran
Veteran


Joined: 24 Sep 2002
Posts: 1734
Location: Velbert

PostPosted: Tue Sep 17, 2013 10:01 am    Post subject: Reply with quote

Du kannst dein komplettes System in ein Squashfs packen und als Initrd verwenden, aber du brauchst schreibzugriff auf einige Ordner. Also im Prinzip wie bei einer LiveCD

Updates werden dann natürlich komplizierter.

Um das zu tun brauchst den PXE/DHCP Teil mit dem TFTP Server von dem Du den Kernel und die "initrd" lädst.

Wenn es wirklich http sein muss, wird es komplizierter, vorallem brauchst aber trotzdem den PXE und TFTP Teil.

Bye
Py
Back to top
View user's profile Send private message
musv
Advocate
Advocate


Joined: 01 Dec 2002
Posts: 3333
Location: de

PostPosted: Tue Sep 17, 2013 11:29 am    Post subject: Reply with quote

py-ro wrote:
Du kannst dein komplettes System in ein Squashfs packen und als Initrd verwenden, aber du brauchst schreibzugriff auf einige Ordner. Also im Prinzip wie bei einer LiveCD

Ich hatte mal irgendwo einen Bericht gelesen. Ist schon etwas länger her. Könnte im Linux-Magazin gestanden haben. Da wurde in einer Schule (?) ein Netzwerk realisiert.

  • Boot per PXE
  • Der Master stellte ein NBD zur Verfügung, was von den Clients dann read-only eingebunden wurde.
  • Zusätzlich wurde noch UnionFS verwendet, um dem Client Fake-Schreibmöglichkeiten einzuräumen.

Dokus dürftest du einige im Netz finden. So ein System aufzubauen, ist aber nicht in 5 Minuten erledigt.

Im Grunde genommen kannst du auch erst mal 'ne Live-CD per PXE zur Verfügung stellen. Wenn das funktioniert und auf dem Client problemlos startet, kannst du dann mit NBD und UnionFS die nächsten Schritte gehen.
Back to top
View user's profile Send private message
bell
Guru
Guru


Joined: 27 Nov 2007
Posts: 508

PostPosted: Tue Sep 17, 2013 1:18 pm    Post subject: Reply with quote

NBD hat den selben Nachteil wie NFS. Das Image ist remote gemounted, was o5i nicht will.

Die einzige Möglichkeit die ich sehe ist es eine kleine selbstgestrickte initramfs per PXE holen. Die kleine initramfs eröffnet dann eine zweite Ramfs, holt per HTTP das Image (normales selbsterstelltes Stage-4) und entpackt dieses On-The-Fly in die neue Ramfs. Anschließend kann das Rootfs gewechselt und das Init-System gestartet werden. Die ramfs muss dann nicht read-only sein, da die Änderungen im RAM ja nicht zurück übermittelt werden.
Back to top
View user's profile Send private message
py-ro
Veteran
Veteran


Joined: 24 Sep 2002
Posts: 1734
Location: Velbert

PostPosted: Tue Sep 17, 2013 1:37 pm    Post subject: Reply with quote

Oder man sparrt sich den HTTP Part und lädt das Image direkt per PXE/TFTP.. ;)
Back to top
View user's profile Send private message
o5i
n00b
n00b


Joined: 16 Feb 2013
Posts: 14
Location: Da Haym

PostPosted: Tue Sep 17, 2013 5:02 pm    Post subject: Reply with quote

Hallo
Genau so hab ich mir das vorgestellt... Den PXE - TFTP - HTTP Teil hab ich bereits am laufen...
Man kann auch einige Distros direkt vom server über http booten z.b. Debian live usw. sind halt 1 GB plus...
zurück zum Thema...
Wie bau ich das Ding?
Back to top
View user's profile Send private message
o5i
n00b
n00b


Joined: 16 Feb 2013
Posts: 14
Location: Da Haym

PostPosted: Tue Sep 17, 2013 8:36 pm    Post subject: Reply with quote

Der pxe bootloader schaut bei mir so aus...
Das meiste kann direkt vom web gebootet werden, einiges ist lokal...
MENU BEGIN Live_os
MENU TITLE Live_os

LABEL Smart Boot Manager
KERNEL memdisk
INITRD http://c3po.lan/live/sbm.bin

LABEL MirBSD
KERNEL memdisk
INITRD http://www.mirbsd.org/MirOS/current/bsd4me.iso

LABEL Tiny Core
KERNEL http://tinycorelinux.net/4.x/x86_64/vmlinuz64
INITRD http://tinycorelinux.net/4.x/x86_64/corepure64.gz

LABEL Micro Core
KERNEL http://static.netboot.me/tinycore/2.2/bzImage
INITRD http://static.netboot.me/tinycore/2.2/microcore.gz

LABEL Ubuntu 13.04 Rescue
KERNEL http://archive.ubuntu.com/ubuntu/dists/raring/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/linux
INITRD http://archive.ubuntu.com/ubuntu/dists/raring/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/initrd.gz
APPEND vga=normal rescue/enable=true -- quiet

LABEL Centos Rescue
KERNEL http://mirror.centos.org/centos/5/os/x86_64/images/pxeboot/vmlinuz
INITRD http://mirror.centos.org/centos/5/os/x86_64/images/pxeboot/initrd.img
APPEND method=http://mirror.centos.org/centos/5/os/x86_64 ip=dhcp noipv6 rescue

LABEL Slitaz
KERNEL memdisk
INITRD http://mirror.slitaz.org/iso/cooking/slitaz-cooking.iso

LABEL Gparted
KERNEL http://c3po.lan/live/gparted/vmlinuz
INITRD http://c3po.lan/live/gparted/initrd.img
APPEND boot=live config union=aufs noswap noprompt vga=788 fetch=http://c3po.lan/live/gparted/filesystem.squashfs

LABEL Pmagic
LINUX http://c3po.lan/live/pmagic/bzImage
INITRD http://c3po.lan/live/pmagic/initrd.img
APPEND edd=off load_ramdisk=1 prompt_ramdisk=0 rw vga=normal loglevel=9 max_loop=256

LABEL Pmagic 64
LINUX http://c3po.lan/live/pmagic/bzImage64
INITRD http://c3po.lan/live/pmagic/initrd.img
APPEND edd=off load_ramdisk=1 prompt_ramdisk=0 rw vga=normal loglevel=9 max_loop=256

LABEL Thin-Client
KERNEL http://c3po.lan/live/thin_client/vmlinuz
APPEND ramdisk_blocksize=4096 initrd=http://c3po.lan/live/thin_client/initrd root=/dev/ram0 ramdisk_size=524288 console=ttyS3 splash=silent vga=791

LABEL Debian_Live (low_ram)
KERNEL http://c3po.lan/live/debian/vmlinuz
INITRD http://c3po.lan/live/debian/initrd.img
APPEND config boot=live netboot=nfs nfsroot=192.168.1.10:/media/netboot/live/debian vga=normal locales=de_DE.UTF-8 keyboard-layouts=de

LABEL Debian_Live
KERNEL http://c3po.lan/live/debian/vmlinuz
INITRD http://c3po.lan/live/debian/initrd.img
APPEND config boot=live fetch=http://192.168.1.10/live/debian/live/filesystem.squashfs vga=normal locales=de_DE.UTF-8 keyboard-layouts=de

LABEL Debian_Live web
KERNEL http://live.debian.net/cdimage/release/stable+nonfree/amd64/webboot/debian-live-7.1-amd64-standard+nonfree.vmlinuz
INITRD http://live.debian.net/cdimage/release/stable+nonfree/amd64/webboot/debian-live-7.1-amd64-standard+nonfree.initrd.img
APPEND config boot=live fetch=http://live.debian.net/cdimage/release/stable+nonfree/amd64/webboot/debian-live-7.1-amd64-standard+nonfree.squashfs vga=normal locales=de_DE.UTF-8 keyboard-layouts=de

LABEL Openelec
KERNEL http://c3po.lan/live/openelec/KERNEL
APPEND ip=dhcp boot=NFS=192.168.1.10:/media/netboot/live/openelec overlay
MENU END


Gibts schon fix und fertig zum laden, kann man auch mit nem tool baun lassen, funktioniert leider nicht so wie ich es möchte und ist relativ langsam....
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum