LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Puppy (https://www.linuxquestions.org/questions/puppy-71/)
-   -   Can't get puppy to work with grub2 (https://www.linuxquestions.org/questions/puppy-71/cant-get-puppy-to-work-with-grub2-805371/)

narnie 05-01-2010 06:55 PM

Can't get puppy to work with grub2
 
Hello,

I'm trying to put puppy linux 4.2.1 (I can't use the latest because it won't boot on my hardware) on a grub2'd usb drive.

It throws the error that it can't find pup_421.sfs

Here is my /boot/grub/grub.cfg

Code:

menuentry "Puppy 4.2.1" {
 loopback loop /boot/iso/puppy-4.2.1-k2.6.25.16-seamonkey.iso

 linux (loop)/vmlinuz  --

 initrd (loop)/initrd.gz
 }

here is my list of important files on the thumb drive

Code:

/media/PENDRIVE/
/media/PENDRIVE/boot
/media/PENDRIVE/boot/grub
/media/PENDRIVE/boot/grub/device.map
/media/PENDRIVE/boot/grub/boot.img
/media/PENDRIVE/boot/grub/cdboot.img
/media/PENDRIVE/boot/grub/diskboot.img
/media/PENDRIVE/boot/grub/kernel.img
/media/PENDRIVE/boot/grub/lnxboot.img
/media/PENDRIVE/boot/grub/pxeboot.img
/media/PENDRIVE/boot/grub/core.img
/media/PENDRIVE/boot/grub/grubenv
/media/PENDRIVE/boot/grub/grub.cfg
/media/PENDRIVE/boot/iso
/media/PENDRIVE/boot/iso/puppy-4.2.1-k2.6.25.16-seamonkey.iso

In the kernel parameter line, I have tried various iterations of

Code:

pfix=ram

or

pfix=noram

or

pmedia=usbhd

None of which work.

Any pointers for the right direction would be appreciated

Yours,
Narnie

paulsm4 05-01-2010 10:25 PM

Hi -

For whatever it's worth:
1. I'm using an even older version of Puppy Linux, Puppy 4.1 (Seamonkey)

2. I can boot from USB stick, from a VM image, and just about anything else with no problem.

3. My Puppy Linux is using "grub" (with the old "menu.lst"), not grub2. I don't know if that makes any difference, or if grub2 is actually the heart of your problem.

4. My sfs (on a VM and virtual hard drive) happens to be here:
/mnt/sr0/pup_410.sfs

SUGGESTIONS:
Why not mount your USB stick as a standard USB device on some other OS (Linux or Windows), and verify:

a) the stick hasn't become somehow corrupted (USB sticks aren't exactly the most reliable ;))

b) you haven't somehow lost your sfs file

'Hope that helps .. PSM

Karl Godt 05-02-2010 08:21 PM

Quote:

loopback loop /boot/iso/puppy-4.2.1-k2.6.25.16-seamonkey.iso

linux (loop)/vmlinuz --

initrd (loop)/initrd.gz
Your grub.cfg looks like a kind of source-code that hasn`t been compiled yet.

grub.cfg isn`t the same as menu.lst !

I havn`t seen `loop` at one menu.lst until now.

menu.lst entries normaly look like:

kernel (hd0,0)/boot/vmlinuz

Puppy 4.3.1 doesn`t uses initrd as second line. It boots up just loading kernel.

and .iso is to be extracted there. As I can remember a post at Lq there was a solution by putting the only one bootable flag to the desired partition by gparted.
I tried this too with one MacPup 4.2.1 from a magazine DVD to stick but somehow it did not work there and it seems there are some corrupted .iso on some linux-magazine-dvd. No .iso download I had until now was corrupted and I downloaded 15 to 20 .iso the last two weeks. Puppy 4.3.1 works fine, also MacPup 4.3.1 . So this time you shouldn`t fear leaving 4.2.1 . And to install something on stick and run a whole mainboard+screen with it is not advisable for me because the fittings are not so tight and there is the possibility of very short power disconnection between board and stick and it should be simple for rescue but I think if the OS doesn`t work just install new Linux. If the usb-fittings would be like the vga- or ttyS-fittings it would be safer.

Quote:

pup_421.sfs
is a first extracted .iso that has to be extracted a second time at first boot but how this would work I do not know. .sqashfs is also a common "ready-to-be-extracted"

aus9 05-02-2010 08:40 PM

hi

me thinks he is trying to boot an hard drive iso using grub2

In which case you may like to peruse.....
http://sidux.com/index.php?module=Wi...g=Grub2isofrom

especially chapt A part D
Chapt B part A

2) Be aware that AFAIK puppy ...using grub-legacy.....also uses inode 128 while grub2 is normally 256.

I have not attempted puppy as an iso boot so good luck

narnie 05-04-2010 02:28 PM

Grub2 allows you to boot from an iso.

It works for anything Ubuntu-like using casper. Works on backtrack, and others.

It seems that puppy can't see inside the ISO like the others to see the pup_421.sfs file.

I'll keep messing around and see what I can do with it.

bobpaul 05-19-2010 11:21 AM

Grub2's looback device option makes a ram drive and copies the kernel and initrd into that ramdisk. However, as soon as the kernel takes control, the ramdisk disappears. That's fine, because the kernel has already loaded its own ramdisk and uncompressed the initrd image to use as a temporary root.

To get Ubuntu to work with grub2's loopback device option, you have to pass the parameter "iso-scan/filename=/PATH/TO/ISO/FROM/GRUBS/PERSPECTIVE.iso"

Ubuntu's initrd scripts (casper) then mounts the pendrive device as /iso-device. Afterwards it mounts the iso from /iso-device/PATH/TO/ISO/FROM/GRUBS/PERSPECTIVE.iso to /cdrom. Since /cdrom is where it normally expects to see the CD-Rom device, the scripts can continue as normal from this point on.

In order to make Puppy work with Grub2, you'll need to modify the initrd.gz file in a manner similar to Ubuntu's Casper. Since this is something I'm interested in, I'd be happy to post any modifications I get working. However, don't expect me to get around to it in the next 2 weeks and I might not get it working. I have some experience modifying casper, but I haven't looked at Lucid Puppy's initrd yet.

narnie 05-21-2010 09:51 AM

This is very interesting. I was hoping to essential make a setup where I could just make a "drop in" replacement with an ISO for these (like I'll be able to do with Ubuntu and other casper-like distros). That said, I would love to learn what you find out as I'm always up for learning these type of things.

Puppy is a nice-enough distro that I would make these mods in order to get it working with my grub2 usb.

You would also be making a significant contribution, because a quick Google search of this issue gives a nice amount of hits with people trying to make our our nice little doggie distro work in this fashion.

I appreciate your breaking down how the loopback works with casper. I figured it was something like this, but it was just guessing. Your explo gave it much more clarity.

I look forward to your postback.

Regards,
Narnie


All times are GMT -5. The time now is 04:08 AM.