[SOLVED] Porteus install and GRUB

Post here if you are a new Porteus member and you're looking for some help.
m1losh
White ninja
White ninja
Posts: 7
Joined: 17 Mar 2013, 18:39
Distribution: Ubuntu, Slackware, openSUSE
Location: Serbia

[SOLVED] Porteus install and GRUB

Post#1 by m1losh » 21 Oct 2013, 16:59

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?
Last edited by m1losh on 02 Nov 2013, 19:55, edited 1 time in total.

User avatar
brokenman
Site Admin
Site Admin
Posts: 6105
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v4 all desktops
Location: Brazil

Re: Porteus install and GRUB

Post#2 by brokenman » 22 Oct 2013, 23:06

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'.
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
Ed_P
Contributor
Contributor
Posts: 8343
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Re: Porteus install and GRUB

Post#3 by Ed_P » 23 Oct 2013, 03:59

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.
Ed

User avatar
brokenman
Site Admin
Site Admin
Posts: 6105
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v4 all desktops
Location: Brazil

Re: Porteus install and GRUB

Post#4 by brokenman » 23 Oct 2013, 12:28

will look for the changes file on the root of the Porteus drive.
Yes, that's what I've stated above.
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
Ed_P
Contributor
Contributor
Posts: 8343
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Re: Porteus install and GRUB

Post#5 by Ed_P » 23 Oct 2013, 13:49

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'.
:(
Ed

User avatar
brokenman
Site Admin
Site Admin
Posts: 6105
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v4 all desktops
Location: Brazil

Re: Porteus install and GRUB

Post#6 by brokenman » 23 Oct 2013, 17:55

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.
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
Ed_P
Contributor
Contributor
Posts: 8343
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Re: Porteus install and GRUB

Post#7 by Ed_P » 23 Oct 2013, 19:12

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?
Ed

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: Porteus install and GRUB

Post#8 by fanthom » 23 Oct 2013, 20:02

@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
Please add [Solved] to your thread title if the solution was found.

User avatar
Ed_P
Contributor
Contributor
Posts: 8343
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Re: Porteus install and GRUB

Post#9 by Ed_P » 24 Oct 2013, 00:18

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.
Ed

User avatar
francois
Contributor
Contributor
Posts: 6434
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

Re: Porteus install and GRUB

Post#10 by francois » 24 Oct 2013, 02:16

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
Last edited by francois on 25 Oct 2013, 02:38, edited 1 time in total.
Prendre son temps, profiter de celui qui passe.

User avatar
Ed_P
Contributor
Contributor
Posts: 8343
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Re: Porteus install and GRUB

Post#11 by Ed_P » 24 Oct 2013, 18:18

francois wrote: as the linux permissions and syslinks are maintained on linux filesystem.
Interesting. Confusing, but interesting. :)

Thanks @francois.
Ed

m1losh
White ninja
White ninja
Posts: 7
Joined: 17 Mar 2013, 18:39
Distribution: Ubuntu, Slackware, openSUSE
Location: Serbia

Re: Porteus install and GRUB

Post#12 by m1losh » 28 Oct 2013, 16:48

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?

User avatar
brokenman
Site Admin
Site Admin
Posts: 6105
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v4 all desktops
Location: Brazil

Re: Porteus install and GRUB

Post#13 by brokenman » 28 Oct 2013, 17:57

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
How do i become super user?
Wear your underpants on the outside and put on a cape.

m1losh
White ninja
White ninja
Posts: 7
Joined: 17 Mar 2013, 18:39
Distribution: Ubuntu, Slackware, openSUSE
Location: Serbia

Re: Porteus install and GRUB

Post#14 by m1losh » 30 Oct 2013, 19:05

@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...

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: Porteus install and GRUB

Post#15 by fanthom » 30 Oct 2013, 19:27

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.
Please add [Solved] to your thread title if the solution was found.

Post Reply