How to modify make_iso.sh for added files [Solved]

Post here if you are a new Porteus member and you're looking for some help.
Post Reply
nassausky
Black ninja
Black ninja
Posts: 35
Joined: 14 Feb 2013, 18:32
Distribution: Porteus v2.0 rc2 i486
Location: NY

How to modify make_iso.sh for added files [Solved]

Post#1 by nassausky » 14 Feb 2013, 22:05

Would anyone know how to add a file to the remastered CD.

The file I would like added is:

/home/guest/.vnc/passwd

I want that file on the remastered CD so it automatically starts up the vncserver on boot. Without that file the user would have to manually run vncpasswd to create it.

Thanks for any help
Last edited by nassausky on 16 Feb 2013, 16:21, edited 1 time in total.

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

Re: How to modify make_iso.sh for added files

Post#2 by Hamza » 14 Feb 2013, 22:13

Place this file into the rootcopy directory or make a module and place it into the /modules folder after executes the make_iso and you'll get your remastered ISO.
NjVFQzY2Rg==

nassausky
Black ninja
Black ninja
Posts: 35
Joined: 14 Feb 2013, 18:32
Distribution: Porteus v2.0 rc2 i486
Location: NY

Re: How to modify make_iso.sh for added files

Post#3 by nassausky » 15 Feb 2013, 01:44

I'm sorry, what it is the rootcopy directory?

kadalka
White ninja
White ninja
Posts: 28
Joined: 05 Dec 2012, 18:53
Distribution: Linux Mint
Location: France

Re: How to modify make_iso.sh for added files

Post#4 by kadalka » 15 Feb 2013, 05:32

nassausky wrote:I'm sorry, what it is the rootcopy directory?
Hello,

rootcopy is a place where you could put everything that you would like to be seen "AS IS".
You do want /home/porteus/myfile.txt ?
Put it in /porteus/rootcopy/ so it would be seen in the CD as /porteus/rootcopy/home/porteus/myfile.txt
When you plan to create a Porteus CD you have some directory in the root CD:
/boot
/porteus

Root copy is in the /porteus directory.

About your needs, you can do this:
1/ mount your CD somewhere, for example in /mnt/MYCD

Code: Select all

mkdir -p /mnt/MYCD
mount -t udf,iso9660 -o ro /dev/sr0 /mnt/MYCD
(No quiet sure about the code above... :shock: Assume it is correct)
(I do mount from dolphin... even if I dislikes dolphin)
2/ copy the cd content somewhere for example in /mnt/REMASTEREDCD

Code: Select all

mkdir -p /mnt/REMASTEREDCD
cp -iRp /mnt/MYCD/* /mnt/REMASTEREDCD/ && echo 'REMASTERED copy is done'
mkdir -p /mnt/REMASTEREDCD/porteus/rootcopy/home/guest/.vnc # -p is necessary here
cp -vip /home/guest/.vnc/passwd  /mnt/REMASTEREDCD/porteus/rootcopy/home/guest/.vnc/ && echo 'VNC copy is done'
su -c 'chown guest.guest -R /home/guest/.vnc' # in case the copy is not correctly set...
toor is the password if you do not change it until now.
This should be enough... :O:

3/ Create the ISO...
4/ Burn your CD... [optional]
(I do not need to burn my CD and NOT installed it, it runs from HDD)
I like Slackware so I tried Porteus...
You don't know everything because you are born to learn ...

nassausky
Black ninja
Black ninja
Posts: 35
Joined: 14 Feb 2013, 18:32
Distribution: Porteus v2.0 rc2 i486
Location: NY

Re: How to modify make_iso.sh for added files [Solved]

Post#5 by nassausky » 16 Feb 2013, 03:43

Great thanks, it worked! On my HDD install it was in /mnt/sda1/porteus/rootcopy

You gave me lots of information and now that I have it functional, I might use the extra information you provided in the future so thanks again for all your answer.

Post Reply