The time now is Thu 23 May 2013, 02:51
All times are UTC - 4 |
| Author |
Message |
wuwei

Joined: 15 Sep 2007 Posts: 739 Location: de
|
Posted: Sun 23 Sep 2012, 12:43 Post subject:
Mehrere Puppies von USB-Stift starten Subject description: Multiboot Puppies from USB flash drive |
|
Ich habe versucht, mehrere Puppies auf einem USB-Stift zu kopieren und von dort mittels Grub-Auswahl zu starten. Der Stift soll unversell auf jedem Rechner verwendbar sein. Dabei bin ich auf ein Grundproblem gestoßen, daß mich viel Zeit gekostet hat.
Zunächst wird im Bios auf Booten von USB-HDD eingestellt.
Sodann der Stift aus einem Puppy heraus vorbereitet.
Man öffnet Menu-System-Grub Legacy bootloader config und wählt dort den Expertenmodus. Dann nacheinander die Positionen Begin, Linux und Install durchgehen.
Damit ist der Stift vorbereitet.
Nun die üblichen Ordner mit den aus den ISOs extrahierten Dateien plus Savefile auf den Stift kopieren. Ebenfalls evtl. vorhandene Ordner und Dateien, die man vorher auf /mnt/home liegen hatte und nun auf dem Stift weiter verwenden möchte.
Als wichtigster Schritt muß nun die /boot/grub/menu.lst angepaßt werden. Sie liegt in eben diesem Ordner auf dem Stift und enthält noch völlig unzutreffende Einträge. Und hier lauert nun die Falle.
Nehmen wir an, der Stift hätte im geöffneten Puppy, das ja von Festplatte (oder CD) gestartet wurde die Laufwerksbezeichnung sdc1. Dann müßte doch ein menu.lst Eintrag für z.B. Slacko so lauten, oder?
| Code: | # Linux bootable partition config begins
title Slacko 533 K3.1.10
root (hd2,0)
kernel /slacko/vmlinuz pmedia=usb psubdir=slacko
initrd /slacko/initrd.gz
# Linux bootable partition config ends |
Leider führt das direkt in einen unerklärlichen Grub Error 17. Ich habe ziemlich lange das Forum vergeblich durchsucht, bis mir dämmerte, daß hd2,0 falsch sein muß. Denn...
Beim Booten vom Stift sind noch keine anderen Partitionen erkannt worden und der Stift ist für Grub die erste Partition der ersten Festplatte zu dem Zeitpunkt. Also heißt der Eintrag:
| Code: | # Linux bootable partition config begins
title Slacko 533 K3.1.10
root (hd0,0)
kernel /slacko/vmlinuz pmedia=usb psubdir=slacko
initrd /slacko/initrd.gz
# Linux bootable partition config ends |
Und damit klappt es?
Nein immer noch nicht. Bootet man den Stift nun nämlich mit dieser menu.lst auf einem Rechner mit Puppies auf der Festplatte, wird der passende Savefile auf der Festplatte angesprochen und man bekommt /mnt/home zB auf sdb2, nicht aber auf sdc1.
Lösung1: Alle Unterordner auf dem Stift anders benennen, als auf der Festplatte und auch so in der menu.lst auf dem Stift vermerken.
Lösung2: Die Puppy Ordner auf der Festplatte mindestens 3 Ordner tief verstecken. Das ist sehr einfach gemacht, wenn alle Puppies auf einer Partition liegen. Man legt einen Ordner D1 mit einem Ordner D2 darin und dort einen Ordner D3 an. Dann die Puppy Ordner nach D3 verschieben. Die Bootroutine des Stiftes kann dann diese Puppies nicht mehr finden.
Nach Beendigung des Experimentes einfach den Inhalt von D3 wieder "nach oben" verschieben.
Viel Erfolg
|
|
Back to top
|
|
 |
rcrsn51

Joined: 05 Sep 2006 Posts: 7753 Location: Stratford, Ontario
|
Posted: Sun 23 Sep 2012, 13:12 Post subject:
|
|
This should be
Also, some flash drive installs don't work correctly if you use a subfolder, like "slacko".
|
|
Back to top
|
|
 |
rhadon

Joined: 27 Mar 2008 Posts: 1228 Location: Germany
|
Posted: Sun 23 Sep 2012, 13:32 Post subject:
|
|
Hallo wuwei,
da ich schon seit Jahren Grub auf usb sticks verwende, kommt es mir gar nicht so kompliziert vor. Grub4Dos funktioniert ebenfalls problemlos.
Bezüglich der gleichen Pfade auf Hd und Stick: hast du mal die Bootoption pdev1 probiert? Ich weiss, dass ich das Problem auch hatte, aber ich weiss nicht mehr, ob pdev1 funktionierte oder ich die Pfade umbenannt habe .
Ich glaube übrigens, "pmedia=usb" ist falsch (du könntest genausogut "pmedia=blahblah" schreiben). Richtig wäre usbhd oder usbflash.
Wünsche noch ein schönes Restwochenende,
Rolf
Edit: rcrsn51 war schneller.
_________________ Ich verwende "frugal", und das ist gut so.
Raspberry Pi without Puppy? No, thanks.
|
|
Back to top
|
|
 |
wuwei

Joined: 15 Sep 2007 Posts: 739 Location: de
|
Posted: Mon 24 Sep 2012, 09:48 Post subject:
Danke |
|
Danke rhadon
thanks rcrsn51
pmedia=usbflash is apparently the better version, albeit pmedia=usb does work in this case.
usbflash ist sicher richtiger, trotzdem funktioniert usb in diesem Falle auch.
Ich werde es aber korrigieren.
|
|
Back to top
|
|
 |
rcrsn51

Joined: 05 Sep 2006 Posts: 7753 Location: Stratford, Ontario
|
Posted: Mon 24 Sep 2012, 11:45 Post subject:
|
|
With Grub4Dos, you can use "UUID" instead of "root (hdx,y)". Then there is no confusion when you boot different ways.
|
|
Back to top
|
|
 |
Karl Godt

Joined: 20 Jun 2010 Posts: 2675 Location: Kiel,Germany
|
Posted: Mon 24 Sep 2012, 13:23 Post subject:
|
|
Das nun ist aus der /init von pup430 :
| Quote: | #kernel with /proc/ide...
#pmedia= usbflash|usbhd|usbcd|ideflash|idehd|idecd|idezip|satahd|satacd|scsihd|scsicd|cd
#kernel without /proc/ide (libata PATA)...
#pmedia= usbflash|usbhd|usbcd|ataflash|atahd|atacd|atazip|scsihd|scsicd|cd |
| Code: |
[ $pmedia ] && PMEDIA=$pmedia #boot parameter, broad category of boot media. ex: cd.
[ $pdev1 ] && PDEV1=$pdev1 #boot parameter, partition have booted off. ex: hda3
[ $psubdir ] && PSUBDIR=$psubdir #boot parameter, directory for puppy files. ex: puppy220
[ $pkeys ] && PKEYS=$pkeys #boot parameter, keyboard layout w476
#now supporting a boot menu...
if [ "$pfix" ];then
for ONEFIX in `echo -n "$pfix" | tr ',' ' '`
do
case $ONEFIX in
ram) PRAMONLY="yes";; #run in ram only (do not load ${DISTRO_FILE_PREFIX}save).
rdsh) RDSH="yes";; #exit to shell in initial ramdisk.
nox) PNOX="yes";; #do not start X.
clean) PCLEAN="yes";; #force version upgrade and cleanup.
purge) PPURGE="yes";; #radical cleanup for broken system.
copy) PCOPY="yes";; #copy .sfs files into ram.
fsck) PFSCK="yes";; #do a fsck of ${DISTRO_FILE_PREFIX}save file.
[0-9]*) PIGNORELAST=$ONEFIX;; #blacklist last $ONEFIX folders (multisession).
esac
done
fi
#v3.95 for backwards naming compatibility...
if [ ! -e /proc/ide ];then #v3.97
[ "$PMEDIA" = "ideflash" ] && PMEDIA="ataflash"
[ "$PMEDIA" = "idezip" ] && PMEDIA="atazip"
[ "$PMEDIA" = "idehd" ] && PMEDIA="atahd"
[ "$PMEDIA" = "idecd" ] && PMEDIA="atacd"
[ "$PMEDIA" = "satahd" ] && PMEDIA="atahd"
[ "$PMEDIA" = "satacd" ] && PMEDIA="atacd"
fi
if [ "$PDEV1" ];then
APATTERN="^${PDEV1}|"
DEV1FS=`echo "$PCPARTS0" | grep "$APATTERN" | cut -f 2 -d '|'`
#v2.20b if booted with PMEDIA=cd, refine it...
if [ "$PMEDIA" = "cd" ];then
case $PDEV1 in
hd*) PMEDIA="idecd" ;; #v3.97
scd*|sr*)
PMEDIA="usbcd"
if [ "`echo -n "$ATADRIVES" | grep "$PDEV1"`" != "" ];then
if [ -e /proc/ide ];then #v3.97
PMEDIA="satacd"
else
PMEDIA="atacd"
fi
fi
;;
esac
fi
fi
|
Zum Thema pmedia *usb* koennte sein, dass neuerer Kode hier eine ^Case Insensitive^ ere Richtung verfolgen koennte .
*
Was man noch wissen muesste : KEINE Leerzeichen in der SubDirectory zB /Puppy 533 , da der Kode in der /init das Leerzeichen oefters als Zeichen-Ketten-Trenner verwendet .
Beispiel :
| Code: | | FND_PUPXXXSFS="`find /mnt/data -maxdepth 2 -xdev -type f -name ${DISTRO_FILE_PREFIX}-${DISTRO_VERSION}.sfs | grep -v ' ' | sed -e 's%^/mnt/data%%g' | tr '\n' ' '`" |
grep -v ' ' wuerde hier inkorrekt filtern .
Auch psubdir=/Puppy-533 koennte Probleme machen :
| Quote: | #in case PSUBDIR boot param (path of puppy files), filter...
if [ "$PSUBDIR" ];then
SPATTERN="/${PSUBDIR}/" |
habe ich zZ bei mir geloest auf diese Art :
| Code: | | [ "$PSUBDIR" ] && SPATTERN="/${PSUBDIR#*/}/" |
*PMG: Allgemein wirkt der ganze Filter-Kode in der /init auf mich nicht wirklich gut durchdacht .
*Die alte ash von Busybox-1.4.2 versteht sehr wohl viele Zeichen-Ketten-Substitutionen .
Dass ich mich mit den pmedia= Parametern vertan hatte kann ich hier verweisen :
Post subject: [Solved] hdd-usb-mismatch
Subject description: pdev1 needed pmedia=usbflash parameter
Auch hatte ich in meiner anfaenglichen Zeit mit pdev=sda2 gebooted, ein Parameter, der eigentlich nicht erkannt werden duerfte, mir aber ^normaler^ erscheint als pdev1, wohl damals einfach uebergangen wurde, da ich nur eine Festplatte hatte und selten etwas externes (USB) angestoepselt hatte beim losstiefeln->den.ganz.doofen = booten :
| Quote: | #in case PDEV1 boot param., override...
if [ "$PDEV1" ];then |
...
[kann sich um Monate handeln, bis ich eine einigermassen funktionierende ueberarbeitete /init habe ]
|
|
Back to top
|
|
 |
wuwei

Joined: 15 Sep 2007 Posts: 739 Location: de
|
Posted: Wed 26 Sep 2012, 08:00 Post subject:
Multiboot von USB |
|
All fine and dandy,
aber nach weiteren Tests muß ich sagen, daß pmedia=usbflash nicht funktioniert, zumindest nicht auf meiner Maschine.
pmedia=usb oder pmedia=usbhdd laufen problemlos.
Bei pmedia=usbflash gerät Puppy in ein dauerhaftes Suchen nach dem SFS-File ohne irgendetwas zu finden.
pmdeia=usbflash, ain't working at all. Puppy searches permanently for the sfs-file without ever finding it. usb and usbhdd are booting fine.
|
|
Back to top
|
|
 |
rcrsn51

Joined: 05 Sep 2006 Posts: 7753 Location: Stratford, Ontario
|
Posted: Wed 26 Sep 2012, 11:23 Post subject:
Re: Multiboot von USB |
|
| wuwei wrote: | | aber nach weiteren Tests muß ich sagen, daß pmedia=usbflash nicht funktioniert, zumindest nicht auf meiner Maschine. |
Using Grub4Dos, I set up a flash drive this way, and it works fine.
| Code: | title puppy_slacko_5.3.3
find --set-root --ignore-floppies /slacko/initrd.gz
kernel /slacko/vmlinuz pmedia=usbflash psubdir=slacko
initrd /slacko/initrd.gz |
There have been other reports like yours about "pmedia=usbflash" not working. It appears that Puppy's startup sequence is running faster than the USB initialization. So Puppy misses the flash drive.
I think that the arguments "usb" and "usbhdd" work for you because they are both invalid. So Puppy ignores them and goes searching elsewhere for the SFS file. After it checks the hard drive, it returns to the flash drive, which is now ready.
Fatdog has a "waitdev" argument to handle this situation.
Try "pmedia=wuwei" and see what happens.
|
|
Back to top
|
|
 |
wuwei

Joined: 15 Sep 2007 Posts: 739 Location: de
|
Posted: Wed 26 Sep 2012, 13:18 Post subject:
|
|
Haha very funny rcrsn51
but I will try your suggestion during the next couple of days.
Since you are talking about Grub4dos, I assume it can be installed on the usb flash, only. I'll experiment a bit with it and see how it goes.
By the way have you tried LiLi Usb Creator. exe for a single boot usb flash drive installation of Puppy? It's amazingly fast and simple.
But first...the multiboot issue.
Thanks for your help, Ontario friend.
|
|
Back to top
|
|
 |
wuwei

Joined: 15 Sep 2007 Posts: 739 Location: de
|
Posted: Thu 27 Sep 2012, 10:12 Post subject:
|
|
Very funny, usb=wuwei does indeed, boot the Puppy.
Ich habe noch einmal den Stift, den ich mit Grub Legacy angelegt hatte, getestet. Ganz offensichtlich erkennt Puppy nicht den Parameter pmedia=whatever.
Erstaunlich ist allerdings, daß die Suchroutine dann sehr wohl direkt den Savefile im Unterordner /sdc1/slacko533 auf dem Stift findet. Puppy findet nicht den anderen slackosave file auf der HDD (/sdb2/slacko/slackosave-533.3fs). Also scheint Puppy nur auf dem Stift zu suchen.
Dann habe ich einen 2. Stift angelegt, diesmal mit der Grub4dos Routine aus dem Puppy Menu (-System-Grub4dos) und den NTFS formatierten Stift damit bootfähig gemacht. Anschließend alle Puppy-Unterordner und ausgeladenen Anwendungsordner (d.h. das komplette /mnt/home) von Stift 1 auf Stift 2 kopiert.
Mit der Grubstanza von rcrsn51 oben habe ich die menu.lst modifiziert und....voilà, Puppy bootet.
Es scheint also ein Unterschied zu sein, ob Grub Legacy oder Grub4Dos installiert wird.
|
|
Back to top
|
|
 |
|
|
|
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 You cannot attach files in this forum You can download files in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|