Help with Porteus boot by Grub?

Post here if you are a new Porteus member and you're looking for some help.
SunBurnt
White ninja
White ninja
Posts: 13
Joined: 05 Aug 2012, 20:24
Location: Arizona, U.S.A.

Help with Porteus boot by Grub?

Post#1 by SunBurnt » 08 Aug 2012, 05:25

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.

crashman
Contributor
Contributor
Posts: 118
Joined: 28 Dec 2010, 17:03
Location: Poland

Re: Help with Porteus boot by Grub?

Post#2 by crashman » 08 Aug 2012, 16:33

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/

User avatar
Ahau
King of Docs
King of Docs
Posts: 1331
Joined: 28 Dec 2010, 15:18
Distribution: LXDE & Xfce 32/64-bit
Location: USA

Re: Help with Porteus boot by Grub?

Post#3 by Ahau » 08 Aug 2012, 16:50

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
Please take a look at our online documentation, here. Suggestions are welcome!

SunBurnt
White ninja
White ninja
Posts: 13
Joined: 05 Aug 2012, 20:24
Location: Arizona, U.S.A.

Re: Help with Porteus boot by Grub?

Post#4 by SunBurnt » 13 Aug 2012, 06:57

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

User avatar
Ahau
King of Docs
King of Docs
Posts: 1331
Joined: 28 Dec 2010, 15:18
Distribution: LXDE & Xfce 32/64-bit
Location: USA

Re: Help with Porteus boot by Grub?

Post#5 by Ahau » 13 Aug 2012, 16:43

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
Please take a look at our online documentation, here. Suggestions are welcome!

SunBurnt
White ninja
White ninja
Posts: 13
Joined: 05 Aug 2012, 20:24
Location: Arizona, U.S.A.

Re: Help with Porteus boot by Grub?

Post#6 by SunBurnt » 13 Aug 2012, 19:31

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.

User avatar
Ahau
King of Docs
King of Docs
Posts: 1331
Joined: 28 Dec 2010, 15:18
Distribution: LXDE & Xfce 32/64-bit
Location: USA

Re: Help with Porteus boot by Grub?

Post#7 by Ahau » 13 Aug 2012, 21:37

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).
Please take a look at our online documentation, here. Suggestions are welcome!

Post Reply