how to specifiy location of .sfs file with grub

Booting, installing, newbie
Message
Author
User avatar
KingKamehameha
Posts: 10
Joined: Wed 24 Aug 2011, 15:28

how to specifiy location of .sfs file with grub

#1 Post by KingKamehameha »

I have a frugal install and the system uses grub. The system has a 90MB /boot so the .sfs won't fit and so it won't boot.
User avatar
wuwei
Posts: 800
Joined: Sat 15 Sep 2007, 11:59
Location: formerly de; now in tranquility

#2 Post by wuwei »

The SFS does not belong into /boot.

For a frugal installation of Puppy you need appr. 3GB minimum partition size. Add to that about 2GB for each additional Puppy you plan to install.

Say you want to have 2 Puppies, then you'd need a 5 GB Linux formated partition. Put your Puppy files into one directory each, install grub and with it the folder /boot. Add any SFS to the root (highest level) of your Linux partition.

You'll see, it will work.
User avatar
KingKamehameha
Posts: 10
Joined: Wed 24 Aug 2011, 15:28

#3 Post by KingKamehameha »

The vmlinuz is in /pup1 the .sfs file is also in /pup1

vmlinuz loads but can't find the .sfs file

Is there a flag for vmlinuz to specify the .sfs file to load?

The docs say the .sfs should be in same place as vmlinuz.
nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#4 Post by nooby »

KingKamehameha is that on an USB flash? if you have an ordinary computer with internal HDD you can do a frugal install and need no such things at all. You only need a subdirectory named puppy and in it you need three files. initrd.gz and linuz and lupu_525.sfs or whatever puppy version you chose. Then in the boot loader you have to add the proper code so you can use the whole hdd. No need to set up a separate partition at all.

here is an example for grub4dos you ahve to change if you use other boot loaders


title luci-529
rootnoverify (hd0,0)
kernel /luci-529/vmlinuz pmedia=satahd pdev1=sda1 psubdir=luci-529
initrd /luci-529/initrd.gz
I use Google Search on Puppy Forum
not an ideal solution though
User avatar
KingKamehameha
Posts: 10
Joined: Wed 24 Aug 2011, 15:28

#5 Post by KingKamehameha »

I have an existing linux on the hdd.
I have / and /boot
I have vmlinuz, initrd.gz and the .sfs in /pup

I will try putting the .sfs in / but don't like that.
User avatar
KingKamehameha
Posts: 10
Joined: Wed 24 Aug 2011, 15:28

#6 Post by KingKamehameha »

Placing the .sfs in / made no difference.

I don't think there's any way to tell vmlinuz where to look for the .sfs

I'll ask again is there a flag for vmlinuz to specify the location of the .sfs?

Also an enhancement would be to have the the boot process not only say that it's looking on disk for the .sfs (as it does now) but to also say where it's looking.
nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

Re: how to specifiy location of .sfs file with grub

#7 Post by nooby »

KingKamehameha wrote:I have a frugal install and the system uses grub. The system has a 90MB /boot so the .sfs won't fit and so it won't boot.
Can you set up frugal install on a bigger partition and change the menu.lst accordingly? A frugal install need no boot as I get it. It only need a directory that has a unique name if there are other frugal installs of Puppy on that partition.

I have three partitions and all of them are on ntfs formatted internal hdd.

All of these partitions are bigger than gigabytes. and I use the biggest one 220GB.

Tell us more how your internal hdd is set up. What other OS do you have. What format for the different partitions. How does your grub looks?
I use Google Search on Puppy Forum
not an ideal solution though
User avatar
rhadon
Posts: 1292
Joined: Thu 27 Mar 2008, 11:05
Location: Germany

#8 Post by rhadon »

KingKamehameha wrote:I have vmlinuz, initrd.gz and the .sfs in /pup
This is right and should work.
If it doesn't work for you, please give us more info.

Which Puppy?
Where is your /pup?
Please post the two entries of your menu.lst (the one for Puppy and the one for the other linux).
The system has a 90MB /boot so the .sfs won't fit and so it won't boot.
I don't understand. Can you explain a little bit more, please?
I'll ask again is there a flag for vmlinuz to specify the location of the .sfs?
AFAIK, no. Not especially for the sfs. You can specify the partition and the directory where to look for all three files.

Well, I see, basically the same questions, nooby was asking.

Rolf
Ich verwende "frugal", und das ist gut so. :wink:
Raspberry Pi without Puppy? No, thanks.
User avatar
KingKamehameha
Posts: 10
Joined: Wed 24 Aug 2011, 15:28

#9 Post by KingKamehameha »

menu.lst

title pup
root (hd0,0)
kernel (hd0,0)/pup/vmlinuz pmedia=satahd psubdir=pup
initrd (hd0,0)/pup/initrd.gz

title lnx
root (hd0,5) <-- that's /boot partition
kernel /vmlinuz root=/dev/sda1 ro

Dunno what version the file is flp-013.sfs

It seems like a silly omission to not have an option to specify the .sfs
Also seems silly to have psubdir. Very possible that I am short on knowledge on the boot process and maybe there are good reasons for the way things are.... I can't imagine what they'd be though.
User avatar
rhadon
Posts: 1292
Joined: Thu 27 Mar 2008, 11:05
Location: Germany

#10 Post by rhadon »

Your menu.lst looks OK for me.
Well, I would use

Code: Select all

title pup 
rootnoverify (hd0,0) 
 kernel /pup/vmlinuz pmedia=satahd psubdir=pup 
 initrd /pup/initrd.gz
but this doesn't seem to be the problem.

You could verify your entries.
At boot menu type c to get a prompt.
Now type

Code: Select all

find /pup/flp-013.sfs
It should return (hd0,0) or at least the location of your file

HTH
Rolf
Ich verwende "frugal", und das ist gut so. :wink:
Raspberry Pi without Puppy? No, thanks.
User avatar
KingKamehameha
Posts: 10
Joined: Wed 24 Aug 2011, 15:28

#11 Post by KingKamehameha »

Am out of ideas.

I did this at grub

press 'c'
root (hd0,0)
find /pup/flp-013.sfs

that returned
(hd0,0)


I changed my grub entry to
rootnoverify (hd0,0)
kernel /pup/vmlinuz pmedia=satahd psubdir=pup
initrd /pup/initrd.gz

Still unable to find the .sfs


How can I download the source for these files?
User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#12 Post by rcrsn51 »

KingKamehameha wrote:Dunno what version the file is flp-013.sfs
.
I'm assuming that you are installing Fluppy? Are you sure that the vmlinuz and initrd.gz files are also from the same Fluppy CD?

Also, is the sfs file on your hard drive the same size as it is on the CD?
User avatar
KingKamehameha
Posts: 10
Joined: Wed 24 Aug 2011, 15:28

#13 Post by KingKamehameha »

All the files are from the same place. The same files I use to boot from a usbdrv.

I am looking for the source these are derived from.
User avatar
rhadon
Posts: 1292
Joined: Thu 27 Mar 2008, 11:05
Location: Germany

#14 Post by rhadon »

KingKamehameha wrote:The same files I use to boot from a usbdrv.
So these files are OK and should also work from your hd.
I am looking for the source these are derived from.
Usually you should get this from Jemimah's server, where you downloaded Fluppy. But there is no reason for it. I don't think, you will get your answer there.btw. the code for searching and loading the sfs file is written in the init script in initrd.gz.
rcrsn51 wrote:Also, is the sfs file on your hard drive the same size as it is on the CD?
I would also check vmlinuz and initrd.gz for the same size, maybe copy them again.

I don't know about other partitions of your hd.
To make sure, that there is only one place, Fluppy can pick up all three files, please use the file command again, but without root (hd0,0).
Press 'c'
find /pup/flp-013.sfs
find /pup/vmlinuz
find /pup/initrd.gz

All three commands should return only (hd0,0).

Another approach:
Do you have another partition on your hd where you could install Fluppy temporarily for testing?
If yes, use another name for your psubdir.
For sda2 maybe:

Code: Select all

rootnoverify (hd0,1) 
 kernel /fluppy/vmlinuz pmedia=satahd psubdir=fluppy
 initrd /fluppy/initrd.gz
Rolf
Ich verwende "frugal", und das ist gut so. :wink:
Raspberry Pi without Puppy? No, thanks.
User avatar
KingKamehameha
Posts: 10
Joined: Wed 24 Aug 2011, 15:28

#15 Post by KingKamehameha »

My linux host (as I've already said) has two partitions.
/
/boot

/boot = 90MB

Unless I repartition (and I don't intend to do that) putting pup onto the
/ partition is my only option.


I've looked at init and it seems to me that init is looking for data in /mnt/data but /mnt/data isn't mounted. It looks to me that the mount doesn't happen so maybe it's a timing issue. i.e. we are looking too soon for data that is not there yet

Or maybe we bootstrap into our sfs too soon, still a timing issue.

Further it looks like the mechanisms to extract disk device data isn't working correctly. May be due to architectural changes due to /proc and /sys.

Also I tried to modify init but then I can no longer boot off my usbdrv.
It seems that maybe vmlinuz has an embedded checksum for init. But I'm not sure.
I'm not sure of much! I do know that I can boot from a usbdrv but not from the hdd.
The usbdrv uses the puppy boot scheme the hdd uses grub.
User avatar
tikbalang
Posts: 47
Joined: Thu 07 Aug 2008, 14:49

#16 Post by tikbalang »

remove "pmedia=satahd" from menu.lst.
amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#17 Post by amigo »

The kernel -vmlinuz- doesn't know anything about sfs files and never will. It's the initrd which looks for and works with them. So any problems you are having must be looked for in the initrd and possibly in the init scripts.
User avatar
KingKamehameha
Posts: 10
Joined: Wed 24 Aug 2011, 15:28

#18 Post by KingKamehameha »

Hola amigo, I never said that vmlinuz knew anything about .sfs.
(if you want you can re-read what I said)

After much time wasted it seems that the problem is that there's no support for xfs.

I did have a chance to see the mess that "init" is though. I don't do shell scripting and after digging around inside "init" I don't intend to start shell scripting.

I saw lots of oddities. disktype can get the fs type but still there's a separate guess_type to get the fs. disktype is used only to get the number of blocks but could be used to get the fs too.

Time for an "init" re-write, I could not do it in shell. I think if busybox has a small perl than I could do a re-write of "init".
amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#19 Post by amigo »

You said: vmlinuz loads but can't find the .sfs file
Anyway, I don't want to fuss. perl for init is not a good idea either -not any better than using shell. You quite correctly saw that the init scripts for puppy are a real mess -don't hold your breath waiting for any improvement though. Every little boot-time option must be handled either by the init process, or previously by the initrd. The boot-process is inherent to the design of the distro, so a complete re-think would mean a complete re-think of what the distro should or can do. Instead of doing that, puppy just keeps adding more and more options which slow things down even more and make the spaghetti-code even worse.

Most LiveCD distros have always done the tricky stuff in the initrd, so that once init starts, it thinks it is on a real hard-drive and can follow a normal-looking boot process. Puppy does too much of the tricks in init itself. A better way would be to do as the others have done and have a nice normal init running -after having the tricks done by a choice of initrds. In other words, there should be a separate initrd for frugal, Live and full installs(where an initrd should rarely be needed).

I've built a system that boots to graphic login in 10 seconds -only 5 seconds to a CLI login. And, without having murdered every sensible purpose of init. If/when I produce some sort of live version of it, it should still use the same init scripts with the 'trickery' done in an initrd.

Proper division of tasks is most helpful.
User avatar
KingKamehameha
Posts: 10
Joined: Wed 24 Aug 2011, 15:28

#20 Post by KingKamehameha »

Gracias amigo.
I am concluding that I will have to create my own distro. I've tried many and there's always something missing or too much included.
I have inherited a netbook that has gma500 (a.k.a. poulsbo) so I have some specific reqs.

I don't understand the difference between initrd and init.
Thanks to all for the help. So long.
Post Reply