Porteus booting is not selective!, let's change that....

New features which should be implemented in Porteus; suggestions are welcome. All questions or problems with testing releases (alpha, beta, or rc) should go in their relevant thread here, rather than the Bug Reports section.
Post Reply
User avatar
wread
Module Guard
Module Guard
Posts: 1062
Joined: 09 Jan 2011, 18:48
Distribution: Porteus v3.2.5-kde5-64 bits
Location: Santo Domingo
Contact:

Porteus booting is not selective!, let's change that....

Post#1 by wread » 28 Aug 2012, 03:26

At the office my desktop runs Porteus 1.2 in HD install (partition 3 with 32 GB ext4 fs); it can be started from first partition, with our normal Porteus welcome page, to the "traditional" OS.

This afternoon I tried to start up this machine from a pen drive with Porteus 1.2 also: I selected bios to boot from usb, but the stupid machine switched from syslinux in pendrive to live Porteus in the HD!

Elemental, Watson!, the machine starts looking for a partition containing a file named porteus-v1.2-i486.sgn, and the first one she finds is enough for her!!!. Ok, I had to erase this file and the machine did what I wanted; before turning off, I copied the file back from pen drive to HD, so it would start next time.

But I realized what was going on by the third time I started the system...A newbie had not understand it at all (if yes, then we were dealing with an "advanced" newbie).

I am trying to find a way to avoid others that situation derived from my "elegant" HD install, without complicating things too much. Somehow the content of the .sgn file should identify the device it belongs to.

Maybe the lin_starts_here (win_start_here) mechanism could do that, writing the device-id to the .sgn file and at transfer, when the .sgn file is found, syslinux could check if the found file belongs to the entity demanding connection; some sort of hand-shake.

I leave the idea in hands of our developers, that is meat for Tom and Jay, I think. That would make Porteus 1.3 much better. Request for comments...

Regards :)

Old William
Porteus is proud of the FASTEST KDE ever made.....(take akonadi, nepomuk and soprano out and you will have a decent OS).
The Porteus Community never sleeps!

User avatar
Hamza
Warlord
Warlord
Posts: 1846
Joined: 28 Dec 2010, 07:41
Distribution: Porteus
Location: France

Re: Porteus booting is not selective!, let's change that....

Post#2 by Hamza » 28 Aug 2012, 10:55

from_dev ?
NjVFQzY2Rg==

beny
Full of knowledge
Full of knowledge
Posts: 720
Joined: 02 Jan 2011, 11:33
Location: italy

Re: Porteus booting is not selective!, let's change that....

Post#3 by beny » 28 Aug 2012, 19:43

wread if you use extlinux you can't load two device at same time ,you have a mix of all and a big headache,you can try to rename the changes folder,but for me one time work and other not.i have two hard disk like a big usb pen device,and if i plug in a usb pen i have some trouble btw with porteus in and booting from pen,i think only grub make the trick but grub with ext4 support.you can try the uuid cheatcode if work.

User avatar
brokenman
Site Admin
Site Admin
Posts: 5436
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: Porteus booting is not selective!, let's change that....

Post#4 by brokenman » 29 Aug 2012, 00:12

Take a look through the cheatcodes.txt document in the boot/docs folder. You can use:

from_dev and from_dir together (as hamza stated) to pinpoint your USB install. Of course we are always open to ideas to simplify things via a menu. You can also use the UUID of the drive which is not exactly user friendly ... but effective.
How do i become super user?
Wear your underpants on the outside and put on a cape.

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: Porteus booting is not selective!, let's change that....

Post#5 by Ahau » 29 Aug 2012, 00:31

'sgnfile=' is another way this could be handled, by using unique sgn's, e.g. port32-1.2onhd.sgn

While echoing the uuid into the .sgn file and doing a 'handshake' would effectively force Porteus to run using the files on the boot device, it would not be able to handle scenarios where, for example, you want to use porteus info on your hard drive while booting from your flash drive; the from_dev method works in all cases (using from_dev=UUID: being the best, as brokenman stated).

I'm currently trying to get extlinux to boot a kernel and initrd from a device/partition other than the boot device (where extlinux is installed)...maybe there's an easy config option for this, but I haven't found it yet.
Please take a look at our online documentation, here. Suggestions are welcome!

sams
Legendary
Legendary
Posts: 27
Joined: 05 Jan 2011, 18:53
Location: Alaska

Re: Porteus booting is not selective!, let's change that....

Post#6 by sams » 01 Sep 2012, 01:26

Ahau wrote:I'm currently trying to get extlinux to boot a kernel and initrd from a device/partition other than the boot device (where extlinux is installed)...maybe there's an easy config option for this, but I haven't found it yet.
Extlinux (and isolinux/syslinux) doesn't know how to navigate other partitions and filesystems other than the one it's installed on (unless things have changed a lot since I looked). But grub can do this:

Code: Select all

menuentry "Porteus Save Changes" --class gnu-linux --class gnu --class os {
        insmod part_msdos
        insmod ext2
        set root='(hd1,msdos2)'
        search --no-floppy --fs-uuid --set=root <my-uuid>
        linux /boot/porteus/vmlinuz from_dev=UUID:<my-uuid> sgnfile=porteusSSD.sgn changes=/dev/sda6/porteus/changes/ vga=791 noautologin vga_detect
        initrd /boot/porteus/initrd.xz
}
This is from /boot/grub/grub.cfg for an ubuntu install. Grub can boot from one partition, then you set the root device to something else and boot linux from a filesystem on another device, without chainbooting. I change my sgnfile around so my HD boot never uses resources from a default porteus install on CD or USB. Also I'm usually set up to boot porteus from an SSD in about 10 seconds but I save changes to a spinning disk.

Post Reply