Edit porteus.cfg - How

Post here if you are a new Porteus member and you're looking for some help.
Post Reply
theblackpig
White ninja
White ninja
Posts: 5
Joined: 20 Sep 2011, 15:12
Location: Oldham UK

Edit porteus.cfg - How

Post#1 by theblackpig » 30 Nov 2011, 20:27

Hi,
Just started with Porteus-
I've created a data file with a default setting BUT is it 0(zero).dat O(capital).dat ?
I ask because I want to edit the porteus.cfg file with the line changes=/mnt/sdb5/john/0.dat

Next I have the .iso for porteus but how do I edit it? (my main OS is Debian) ?

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: Edit porteus.cfg - How

Post#2 by Ahau » 30 Nov 2011, 20:46

Welcome, theblackpig!

The .dat manager defaults to 0.dat (that's the zero numeral). You can rename it during creation to anything you like (just delete the 0 and enter something else) e.g. 'save.dat', 'john-save.dat', etc. if that makes it easier. You could also rename the file after it is created. Just right click, select rename, delete the 0, and type the new name. You just have to make sure that the path and file name are correct in your porteus.cfg. Let us know if you have any further troubles :)

You also asked about editing the ISO. Are you looking to create a custom ISO file that can be burned to a CD with your modifications? If so, then what you need to do is extract the ISO, customize all of the files to your liking, and then run the /porteus/make_iso.sh script from within the customized file tree. See here: http://porteus.org/faq.html#22
Please take a look at our online documentation, here. Suggestions are welcome!

theblackpig
White ninja
White ninja
Posts: 5
Joined: 20 Sep 2011, 15:12
Location: Oldham UK

Re: Edit porteus.cfg - How

Post#3 by theblackpig » 30 Nov 2011, 21:09

Hi Ahau,
Thank you for your prompt reply.
Perhaps I didn't ask the question properly :oops:
I have a usb 500GB hard drive but if I install porteus to it I can't boot it( can only boot to CD) , I need the live CD with with data and settings saved to the hard drive.
I believe having the data file on the hd overcomes this problem.
The problem I'm having is when I edit the .cfg file I don't seem to be able to save the changes :(

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: Edit porteus.cfg - How

Post#4 by Ahau » 30 Nov 2011, 22:11

No worries :) I think I get it now.

Does your BIOS not support booting from the external drive, or do you want to avoid modifying the external hard drive's MBR? If your BIOS is the holdup, you might be able to boot the following way:
1) install Porteus to the hard drive with SYSLINUX or EXTLINUX (depending on the filesystem) written to the MBR
2) put the Porteus CD in to your computer
3) boot your computer off of the CD
4) when the ISOLINUX boot menu comes up, arrow down to the "Plop Bootloader" entry and press enter
5) find and select your external hard drive -- Plop may be able to chainload to it, and load SYSLINUX/EXTLINUX

Then, you can customize the porteus.cfg on your external drive and the changes will show up in the SYSLINUX/EXTLINUX menu. However, this is kind of a convoluted way to boot your system.

I think I tried something similar a while back and had some luck with it -- but other folks might have a better solution.

If you want to stick with booting Porteus off a CD and only loading your changes from the hard drive, then you will either need to manually enter the cheatcode each time you boot (i.e., boot into the ISOLINUX boot menu, highlight your desired entry, press tab, and type in changes=/path/to/save.dat) or customize the ISO as I suggested above by extracting it, editing the /boot/porteus.cfg file and then running the make_iso script to create a custom ISO. You can't modify the file inside the ISO without extracting and recompressing. It's not as hard as it sounds once you try it :)
Please take a look at our online documentation, here. Suggestions are welcome!

theblackpig
White ninja
White ninja
Posts: 5
Joined: 20 Sep 2011, 15:12
Location: Oldham UK

Re: Edit porteus.cfg - How

Post#5 by theblackpig » 30 Nov 2011, 22:21

Will give it a go and let you know how I get on :roll:

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

Re: Edit porteus.cfg - How

Post#6 by brokenman » 01 Dec 2011, 03:04

My post will assume you have download the latest rc2 ISO fromm our testing server.

Here is another option.

You have downloaded the Porteus ISO somewhere in your debian file system:

1) You must login as a root user, if not root user then switch to root user using following command:
$ su -

2) Create the directory i.e. mount point:
# mkdir -p /mnt/porteus

3) Use mount command as follows to mount the porteus ISO file
# mount -o loop Porteus-v1.1rc2-i486.iso /mnt/porteus

Now you have your Porteus data in a read-only state at /mnt/porteus

From here you have a few options, one of which i would recommend copying all the files to a USB and running Porteus that way.

Option 1)
Modify your porteus.cfg file to save changes to your external drive or even to boot from the external drive using the CD as a starter.

Copy the Porteus files to a writable directory first:
# mkdir /tmp/porteus && cp -Rdp /mnt/porteus/* /tmp/porteus

Now you should have two folders (porteus & boot) and a USB install instruction file in /tmp/porteus.
open the porteus.cfg file and point your changes=/mnt/sdx4/porteus (or wherever you want to save your changes on your external hard drive.) Now run the make_iso.sh file found in the porteus folder.

# cd /tmp/porteus && make_iso.sh /tmp/MyHackedPorteus.iso
This will create another iso you can burn to disk and your changes will be saved to your external drive

Option 2)
Do the same as above only copy the MyHackedPorteus.iso to your external drive somewhere (e.g /mnt/sda5/MyHackedPorteus.iso) Now boot from your current Porteus CD and hit TAB at the boot and enter from_iso=/mnt/sda5/MyHackedPorteus.iso which will make porteus boot from your hacked ISO hence saving all changes to your external drive.

Option 3)
When you first mounted your ISO, you could copy the files to your external HD (e.g /mnt/sda5/port) Now when you boot from CD (preferably USB) you can hit TAB and enter the cheat to boot from the external drive files you just copied there: from_dev=/dev/sda5 from_dir=port/porteus which should find your porteus files and boot from them. You can also read the cheatcodes.txt document in the boot folder which will explain how to use from UUID cheats so you can be sure you will be booting from your external drive.

In any case, if you finally get Porteus running from your external drive, please open a console and type:psinfo which will dump and information file on your desktop which you can upload to pastebin.com and link to from our forums.

Oh .... welcome to porteus. Our next version will include an installer that should make this process much more streamlined.
How do i become super user?
Wear your underpants on the outside and put on a cape.

theblackpig
White ninja
White ninja
Posts: 5
Joined: 20 Sep 2011, 15:12
Location: Oldham UK

Re: Edit porteus.cfg - How

Post#7 by theblackpig » 02 Dec 2011, 12:54

Hi brokenman
Thank you for you comprehensive reply. One problem, I'm a bit of an ignoramus :oops: and I've fallen at the first hurdle, I have downloaded the rc2 ISO - went into root entered "mkdir -p /mnt/porteus" and nothing happened!
I then entered mount and got the following :-

/dev/sda1 on / type ext3 (rw,errors=remount-ro)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
/dev/sda6 on /home type ext3 (rw)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
/dev/sdb1 on /media/6b076692-e98a-4be2-ace9-7b9c605106bc type ext3 (rw,nosuid,nodev,uhelper=udisks)

There seems to be a problem copying to the external hard drive , I can't copy anything to it , it tells me I don't have permission as I'm not root ?
Where do I go from here please?

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

Re: Edit porteus.cfg - How

Post#8 by brokenman » 02 Dec 2011, 13:39

I can't copy anything to it , it tells me I don't have permission as I'm not root ?
Where do I go from here please?
1) You must login as a root user, if not root user then switch to root user using following command:
$ su -

You may need to enter your root password here. You will know when you are root as the $ prompt will change to a # prompt. You can also type whoami to check if you are root.

Once you are root, you will have no restrictions on your system. The command mkdir -p /mnt/porteus should simply create a directory. After making it check with: ls /mnt

Next mount the ISO in your new directory: (/mnt/porteus)
mount -o loop /path/to/your/Porteus-v1.1rc2-i486.iso /mnt/porteus

At this stage you should have a list of the ISO files in /mnt/porteus and you can continue with your instructions. Remember you won't be able to alter anything in this directory as it is just a 'read only' file system. You will need to copy everything in /mnt/porteus to some other directory (non fat32) in order to edit stuff. I always use cp -Rdp /mnt/porteus /tmp which will ensure all permissions and links are maintained. You will then have a folder (/tmp/porteus) that is yours to play with and edit. Keep us posted.
How do i become super user?
Wear your underpants on the outside and put on a cape.

theblackpig
White ninja
White ninja
Posts: 5
Joined: 20 Sep 2011, 15:12
Location: Oldham UK

Re: Edit porteus.cfg - How

Post#9 by theblackpig » 02 Dec 2011, 15:50

OK up to here ,
Entered this - mount -o loop /john/Downloads/Porteus-v1.1rc2-i486.iso /mnt/porteus
and got this - /john/Downloads/Porteus-v1.1rc2-i486.iso: No such file or directory :(

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

Re: Edit porteus.cfg - How

Post#10 by brokenman » 05 Dec 2011, 21:26

Please give output from:

whoami
ls /mnt
ls /john/Downloads
How do i become super user?
Wear your underpants on the outside and put on a cape.

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

Re: Edit porteus.cfg - How

Post#11 by Hamza » 06 Dec 2011, 14:12

ls /john/Downloads
This command will give you an error because, there is not any directory in the root named /john..So no directory = an error from ls binary.

To works, this command need to haven't a slash at begin OR it needs to begin with ./john
NjVFQzY2Rg==

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

Re: Edit porteus.cfg - How

Post#12 by brokenman » 07 Dec 2011, 12:48

A simple solution to avoid all confusion.

Move Porteus-v1.1rc2-i486.iso to /tmp/Porteus-v1.1rc2-i486.iso

Code: Select all

mkdir /mnt/loop
mount -o loop /tmp/Porteus-v1.1rc2-i486.iso /mnt/loop
Your error is complaining about not being able to find the ISO file ... so the path given must be incorrect ... or the computer is incorrect. My money goes on the first option.
How do i become super user?
Wear your underpants on the outside and put on a cape.

Post Reply