Page 1 of 1

Help with Porteus boot by Grub?

Posted: 08 Aug 2012, 05:25
by SunBurnt
I have Puppy Linux and Tiny Core Linus versions booting with Grub, I`d like to add Porteus to this setup.

I need an example of the Grub boot code section for Porteus. Translating from ExtLinux to Grub is hazardous.

I like SysLinux, ExtLinux, PxeLinux, but I happen to have this current setup... Thanks for any help! Terry B.

Re: Help with Porteus boot by Grub?

Posted: 08 Aug 2012, 16:33
by crashman
Hi SunBurnt

This example booting Porteus from hard drive. First from image file, second method is normally, booting Porteus with "dev=/" and "from_dir=/" cheatcode.

"xlive" is directory for all my livecd distros.

Code: Select all

title Porteus-XFCE from NTFS partition
fallback 1
map --mem (hd0,0)/xlive/boot/porteus-xf (hd0)
map --hook
chainloader (hd0)+1
rootnoverify (hd0)
map --harddrives=1
boot

title Porteus-v.1rc2 text mode
root (hd0,0)
kernel /xlive/Porteus-v1.1rc2-i486/boot/vmlinuz vga=791 autoexec=xconf;startx from_dev=/dev/sda1 from_dir=/xlive/Porteus-v1.1rc2-i486/porteus
initrd /xlive/Porteus-v1.1rc2-i486/boot/initrd.xz 
If you need install on to usb flash memory you can find more info about grub and "find --set-root" option.

Article about instalation on to flash drive memory.http://www.freesoftwaremagazine.com/art ... rub_intro/

Re: Help with Porteus boot by Grub?

Posted: 08 Aug 2012, 16:50
by Ahau
Thanks, crashman! I was going to look up some examples, but you beat me to it :)

fyi, you can drop "autoexec=xconf;startx" from the append line, as init 4 is now the default runlevel (/etc/rc.d/rc.4 starts the desktop manager via kdm or lxdm rather than startx) and most systems should be configured properly without autoexecuting xconf (but this is still useful for systems that might not get autoconfigured properly).

here are a couple other examples:

copy2ram, booting from a subdirectory (/boot and /porteus inside /mnt/sdb2/32/)

Code: Select all

title Porteus, no changes, copy to RAM
root (hd0,0)
kernel /32/boot/vmlinuz from_dev=/dev/sda1 from_dir=/32/porteus/ vga=791 copy2ram 
initrd /32/boot/initrd.xz
with saved changes (assumes porteus is on a posix-compatible filesystem), /boot and /porteus inside root of the device

Code: Select all

title Porteus w/changes
root (hd0,0)
kernel /boot/vmlinuz vga=791 changes=/porteus/ 
initrd /boot/initrd.xz

Re: Help with Porteus boot by Grub?

Posted: 13 Aug 2012, 06:57
by SunBurnt
I`m not sure why, but I had the 2 Porteus dirs. in a dir. and it wouldn`t boot.
So I had to move /porteus and /boot to /mnt/sda4 to get it booting.
I`m going to move everything back into /mnt/sda4/porteus-1.2 and try it again.

menu.lst looked like this:

Code: Select all

  title Porteus-1.2  FRUGAL   ( 400 GB - part.4 )
  root (hd0,3)
  kernel /porteus-1.2/boot/vmlinuz vga=791 xfce autoexec=xf-compositing~off changes=/porteus-1.2/porteus/
  initrd=/porteus-1.2/boot/initrd.xz

Re: Help with Porteus boot by Grub?

Posted: 13 Aug 2012, 16:43
by Ahau
To boot from a subdir, you will need the from_dev and from_dir cheatcodes in your kernel line, e.g.:

Code: Select all

kernel /porteus-1.2/boot/vmlinuz from_dev=/dev/sda4 from_dir=/porteus-1.2/porteus vga=791 xfce autoexec=xf-compositing~off changes=/porteus-1.2/porteus/
There's more info on the from_dev and from_dir cheatcodes in /boot/docs/cheatcodes.txt. If you put Porteus on a drive that will be used on multiple machines (so /dev/sdXY might not always be the same), you can use the UUID for your device (check output of the 'blkid' command), e.g. from_dev=UUID:6546-234USTS-539 and it will find the correct device. Booting from a hard drive, you should have no problem with from_dev=/dev/sda4

Re: Help with Porteus boot by Grub?

Posted: 13 Aug 2012, 19:31
by SunBurnt
Thanks Ahau; I was looking at that in your examples.
Puppy does a search of all available devices and partitions if it`s not specified.
But specifying it is always faster and search code just complicates the bootup.

Re: Help with Porteus boot by Grub?

Posted: 13 Aug 2012, 21:37
by Ahau
Porteus runs a search as well, looking for a specific .sgn file (e.g. porteus-v1.2-i486.sgn) inside /porteus; If you move the porteus folder (and thus, the .sgn file) into a subdirectory, it will not be found by this search -- at this point, you have to start using the from_dev and from_dir cheatcodes to point the to the specific location. Of course, you can still use these cheatcodes with a typical setup in order to avoid the time spent searching for the .sgn file. I use them with every porteus install I have, but admittedly, I don't have a typical setup (5 or 6 different versions are on my flash drive at any given time).