Page 1 of 2

[SOLVED] Porteus install and GRUB

Posted: 21 Oct 2013, 16:59
by m1losh
Hi all,

I have system on which is GRUB primary bootloader located to MBR.
I wander which is the best way to connect GRUB and Porteus installed on one of hdd partitions?
Since Porteus install script offers to install LILO as a bootloader, is it possible to connect GRUB from MBR and LILO on partition with Porteus?

I currently have some strange "installation" of Porteus, made by myself.
I created partition, copied files and added the following parameters in GRUB config:

Code: Select all

	set root=(hd1,7) 
	linux /boot/syslinux/vmlinuz copy2ram from=/
	initrd /boot/syslinux/initrd.xz 
		changes=/save/changes


The problem is, although I have "installed" Porteus on ext4 partition, it doesnt save changes unless I make changes module before shutting down. I also added cheatcode changes= to boot parameters, but I'm not sure which one of two remembers the changes I make.

Does anyone have some advice how to configure my sistem so I can choose to boot Porteus instalation on hdd from GRUB boot menu?

Re: Porteus install and GRUB

Posted: 22 Oct 2013, 23:06
by brokenman
A quick search of the forum for 'grub config' revealed this:

set root=(hd1,7)
linux /boot/syslinux/vmlinuz from=/porteus changes=/porteus
initrd /boot/syslinux/initrd.xz


The changes= cheatcode will keep your changes on the porteus media in a folder aptly called 'changes'.

Re: Porteus install and GRUB

Posted: 23 Oct 2013, 03:59
by Ed_P
brokenman wrote: linux /boot/syslinux/vmlinuz from=/porteus changes=/porteus
initrd /boot/syslinux/initrd.xz


The changes= cheatcode will keep your changes on the porteus media in a folder aptly called 'changes'.
Ah, I'm a newbie but I do use the changes= cheatcode and I'm pretty sure the changes=/porteus code will look for the changes file on the root of the Porteus drive.

I've also found that the changes file has to be initialized by Porteus, at least in Razor 2.1, before changes are saved.

Re: Porteus install and GRUB

Posted: 23 Oct 2013, 12:28
by brokenman
will look for the changes file on the root of the Porteus drive.
Yes, that's what I've stated above.

Re: Porteus install and GRUB

Posted: 23 Oct 2013, 13:49
by Ed_P
brokenman wrote:
EdP wrote: will look for the changes file on the root of the Porteus drive.
Yes, that's what I've stated above.
!! Oh!! That's not how I read
brokenman wrote:in a folder aptly called 'changes'.
:(

Re: Porteus install and GRUB

Posted: 23 Oct 2013, 17:55
by brokenman
In the case that your are using a FAT partition you must specify the path of the changes file. If you are using a native Linux partition then a folder called 'changes' will be created. I should have been a little clearer from the start.

Re: Porteus install and GRUB

Posted: 23 Oct 2013, 19:12
by Ed_P
Good grief!! Thank you for the explanation. :) Wouldn't it be easier if the file/folder structures were consistent across partition formats? Easier to explain, easier to maintain, etc. Is there any advantage to having them different?

Re: Porteus install and GRUB

Posted: 23 Oct 2013, 20:02
by fanthom
@EdP
you should really read our documentation. this would save you time and our time - pure win.
http://www.porteus.org/component/conten ... d-one.html

Re: Porteus install and GRUB

Posted: 24 Oct 2013, 00:18
by Ed_P
Thanks @fanthom. A nice write up but it doesn't answer the question why the changes file/folder gets allocated differently based on file system. It also doesn't mention the RazorQT system that I use.

As for the purpose of the changes file and how to allocate it that I knew.

But I think we are getting a little off topic.

Re: Porteus install and GRUB

Posted: 24 Oct 2013, 02:16
by francois
Windows filesystem needs the creation of a .dat container for non-linux filesystem to to be compatible with porteus linux, which is explicitly explained :) in :
http://www.porteus.org/component/conten ... d-one.html
If you are installing Porteus to a device that is formatted with a Windows filesystem (e.g. FAT 32, NTFS, etc) , you are required to use a '.dat' container for your changes. This container allows you to retain linux permissions and symlinks, which are necessary for your system to run properly and securely.
You do not need to create a .dat container when you use porteus linux with linux filesystem (ext2, ext3, xfs ...), as the linux permissions and symlinks are maintained on linux filesystem. Linux os needs linux filesystem, .dat container is needed to compensate the inadequacy of windows filesystem and to accomodate those wanting to work with windows formatted partitons.

From /boot/docs/cheatcodes.doc:
changes=/dev/device
changes=/path/
changes=/path/file.dat

... All changes made in Porteus are kept in memory until you reboot.
With this boot parameter, you tell Porteus to use a device
(or a file or directory) other than your memory for storing
changes. You can, for example, format your disk partition
/dev/sdb2 with some Linux filesystem (eg. xfs) and then use
'changes=/dev/sdb2' to store all changes to that partition.
This way you won't loose your changes after reboot.
... If you use a file image instead of a device, and the image
contains a valid filesystem, Porteus will mount it on a loop
device and will store changes to it.
... If you use a directory, Porteus will save changes to it (it
will make a 'changes' subdirectory there). This should only
be used for linux filesystems, if changes need to be saved

Re: Porteus install and GRUB

Posted: 24 Oct 2013, 18:18
by Ed_P
francois wrote: as the linux permissions and syslinks are maintained on linux filesystem.
Interesting. Confusing, but interesting. :)

Thanks @francois.

Re: Porteus install and GRUB

Posted: 28 Oct 2013, 16:48
by m1losh
Even if my post has broad spectre of questions, this topic has gone in wrong direction.
Let me clear my first post:
1. Why Porteus doesn't save my work even if its installed on native Linux partition?
2. What is the difference between changes folder and changes module?
3. What is the best way to install Porteus on separate HDD partition with GRUB as bootloader and another Linux/Windows systems on other partitions? Since I managed to get GRUB to invoke Windows bootloader on another partition, I guess its possible to invoke LILO in the same way, or I'm wrong?

Re: Porteus install and GRUB

Posted: 28 Oct 2013, 17:57
by brokenman
1. Why Porteus doesn't save my work even if its installed on native Linux partition?
You need to make sure you are using the changes= cheatcode.
From a console enter: cat /proc/cmdline
or cat /var/log/porteus-livedbg
2. What is the difference between changes folder and changes module?
When you use the changes= cheatcode (on a Linux filesystem) the changes folder is created at the root of the porteus folder. All changes persist here to the next reboot. The changes module you create is just a module from this folder. If you reboot and you are losing your changes then most probably you are not using the changes= cheatcode (explained above). You can add this line to your porteus.cfg file located in the boot/syslinux folder on the porteus media.
3. What is the best way to install Porteus on separate HDD partition with GRUB as bootloader and another Linux/Windows systems on other partitions?
If you are using windows 7 then perhaps look at easybcd which can be installed under windows.T The other option is to install the grub bootloader (overwrite the mbr) and then add the text from my initial post as well as the code block to load windows. If

Re: Porteus install and GRUB

Posted: 30 Oct 2013, 19:05
by m1losh
@brokenman
Now I get it all clearer. My cat /proc/cmdline says that the changes are stored in memory, but I don't know why is that so. I am using GRUB bootloader and my startup parameters are currently almost the same as your post above, except I have added copy2ram parameter. I don't think that my startup depends on porteus.cfg...

Re: Porteus install and GRUB

Posted: 30 Oct 2013, 19:27
by fanthom
your 'changes=' cheatcode is in the wrong place. try this:

Code: Select all

set root=(hd1,7)
linux /boot/syslinux/vmlinuz copy2ram changes=/save/changes
initrd /boot/syslinux/initrd.xz
btw: 'from=/' does not make any sense. please read /boot/dosc/cheatcodes.txt how to use it properly.