Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
system nach ramdisk booten
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
peterpeterson
n00b
n00b


Joined: 19 Apr 2007
Posts: 24

PostPosted: Mon Oct 29, 2007 7:48 pm    Post subject: system nach ramdisk booten Reply with quote

Hallo

ich habe mir so eine kleine Kiste (n2100) organisiert.
Gentoo-Installation nach einigen Problemen mittlerweile erfolgreich ;-)

nun hat das ding diverse MTDs.
eines für den Kernel (working!)
eines für ein RAM-Disk-Image (working!)

nun möchte ich, nachdem mein Kernel das RAM-Disk-Image gebootet hat (module laden, md-raid prüfen, sshd für 30 sec. aufmachen für Revisor in Notfällen, etc), das vollständige System auf der Platte booten.

habe mir da auch schon so einiges angelesen, komme aber an folgendem Punkt des initscriptes der RAM-Disk nicht mehr klar:

inittab der RAM-Disk
----------------------
::sysinit:/etc/init.d/rcS

/etc/init.d/rcS
----------------------
#!/bin/sh

# bla bla bla

# start etwas
# kill etwas

# meine HDD mounten
mount -t ext3 -o ro /dev/md1 /mnt

# irgenwas mit dem root auf dem ram machen!?
echo "0x100" > /proc/sys/kernel/real-root-dev

# mich von einigen Sachen trennen
umount /sys /proc

# betreten der neuen umgebung
cd /mnt
/sbin/pivot_root . oldroot
exec chroot . /bin/sh -c '/sbin/init q && exec /sbin/init 3' <dev/console >dev/console 2>&1

so das was ich in der letzeten zeile geschreieben habe
(/sbin/init q && exec /sbin/init 3)
ist schmuhh.
wie würde man das denn bitte richtig machen?
bzw. dem gentoo mitteilen, dass es jetzt von vorne anfängt zu booten.

ich muss wohl die inittab neu einlesen: init q
wo ist dann wohl der punkt wo ich ansetzten müsste,
bzw. was muss ich init mitgeben?
muss ja noch von der inittab (HDD) irgedwas von dem folgenden bestimmt auch drinhaben

# System initialization, mount local filesystems, etc.
si::sysinit:/sbin/rc sysinit
# Further system initialization, brings up the boot runlevel.
rc::bootwait:/sbin/rc boot

bis ich dann in mein RUNLEVEL default komme.

habe zwischendurch (gefähliches Halbwissen ;-) ) was bei init von PREVLEVEL gelesen. hilft mir das bei meinem Plroblem? indem ich das einfach auf sysinit setzte (bzw. davor? bzw. was?) oder ist das nur zum auslesen? bei mir steht nix drin, wenn ich das in der Console echo-e.

cu tim
Back to top
View user's profile Send private message
Qubit
Tux's lil' helper
Tux's lil' helper


Joined: 23 Sep 2002
Posts: 136
Location: /dev/urandom

PostPosted: Tue Oct 30, 2007 11:00 am    Post subject: Reply with quote

Ohne jetzt genau Deinen Weg zu verfolgen, boote ich meine Webserver über PXE/TFTP,
dazu wird einfach innerhalb eines loop-files "debootstrapt" u. das ganze per cpio gepackt.
Das Image wird dann per initrd angegeben.

innerhalb des image muss einfach nur ein symllink gesetzt werden.

ln -s /sbin/init /

Evtl. hilft Dir das ja weiter.

Gruß Daniel
_________________
©Qubit
Back to top
View user's profile Send private message
peterpeterson
n00b
n00b


Joined: 19 Apr 2007
Posts: 24

PostPosted: Tue Oct 30, 2007 12:17 pm    Post subject: Reply with quote

hallo

ähm.. wie jetzt?
von wo nach wo?
einfache den link innerhalb meiner RAM-Disk!?
(also die busybox-ramdisk läuft super, nur der Übergang auf die Platte nicht)
oder das init meines new_root auf die RAM-Disk?

cu tim
Back to top
View user's profile Send private message
Qubit
Tux's lil' helper
Tux's lil' helper


Joined: 23 Sep 2002
Posts: 136
Location: /dev/urandom

PostPosted: Tue Oct 30, 2007 12:33 pm    Post subject: Reply with quote

Sry, ich habe wohl zu schnell geschossen u. Dein Vorhaben falsch interpretiert.

Gruß Daniel
_________________
©Qubit
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