SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2009-01-28 23:44:36

fladd
Member
Registered: 2009-01-19
Posts: 40

Files in casper-rw overwritten in persistent USB installation

Hi there,

in a persisten USB installation done like here http://www.pendrivelinux.com/crunchbang … ll-via-cd/ the files autostart.sh and menu.xml get overwritten in the casper-rw everytime the system is restarted. Thus, any changes made there are NOT persistent.

Any ideas on why this is done and how to fix it?

Regards,
fladd

Last edited by fladd (2009-01-28 23:45:08)

Offline

Help fund CrunchBang, donate to the project!

#2 2009-01-28 23:51:56

anonymous
The Mystery Member
From: Arch Linux Forums
Registered: 2008-11-29
Posts: 9,416

Re: Files in casper-rw overwritten in persistent USB installation

Online

#3 2009-01-29 12:05:25

fladd
Member
Registered: 2009-01-19
Posts: 40

Re: Files in casper-rw overwritten in persistent USB installation

Well, that works for the menu.xml, thanks!

But what about the even more crucial autostart.sh? This one cannot be set in the rc.xml.

fladd

Offline

#4 2009-01-29 15:37:55

fladd
Member
Registered: 2009-01-19
Posts: 40

Re: Files in casper-rw overwritten in persistent USB installation

Okay, I have sort of a hack that works:

In .profile I added a command to copy a 'my-autostart.sh' to 'autostart.sh'. In the menu.xml I then replaced autostart.sh with my-autostart.sh such that I can edit it quickly.

fladd

Offline

#5 2009-01-29 20:40:50

fladd
Member
Registered: 2009-01-19
Posts: 40

Re: Files in casper-rw overwritten in persistent USB installation

No, this does not work. Everytime it boots, the desktops is frozen. New programmes can be started by the shortcut, but do not appear on the desktop, just on the panel.
When I then restart the Xserver, it works.

Any ideas?

fladd

Last edited by fladd (2009-01-29 21:02:19)

Offline

#6 2009-01-30 21:25:58

JO
New Member
Registered: 2009-01-30
Posts: 3

Re: Files in casper-rw overwritten in persistent USB installation

Hi, I have the same problem with autostart.sh being overwritten.

One question; where do you find the .profile folder mentioned in post number 4?
I'd like to test that hack.

/JO

Last edited by JO (2009-01-30 21:27:18)

Offline

#7 2009-01-31 12:07:12

fladd
Member
Registered: 2009-01-19
Posts: 40

Re: Files in casper-rw overwritten in persistent USB installation

I now found a way to solve the problem:
I copy the my-menu.xml and the my-autostart.sh to menu.xml and autostart.sh in the following file: /etc/gdm/PreSession/Default.
This works perfectly.
I also delete the /etc/mtab in /etc/gdm/PostSession/Default, due to a bug that will let the mtab grow at every boot.

Regards,
fladd

Offline

#8 2009-01-31 19:52:58

JO
New Member
Registered: 2009-01-30
Posts: 3

Re: Files in casper-rw overwritten in persistent USB installation

No, doesnt seem to work for me.
Did you paste the text contents of menu.xml and autostart.sh straight into the file Default located in the /etc/gdm/PreSession/ directory?

Furthermore i cannot locate the /etc/mtab in /etc/gdm/PostSession/Default.

Any ideas?

Offline

#9 2009-01-31 21:46:42

fladd
Member
Registered: 2009-01-19
Posts: 40

Re: Files in casper-rw overwritten in persistent USB installation

JO wrote:

No, doesnt seem to work for me.
Did you paste the text contents of menu.xml and autostart.sh straight into the file Default located in the /etc/gdm/PreSession/ directory?

Furthermore i cannot locate the /etc/mtab in /etc/gdm/PostSession/Default.

Any ideas?

Okay, I think you confused something :-)

What I did was the following:

- I created a my-menu.xml and a my-autostart.sh (both are in the same folder where menu.xml and autostart.sh are, this is ~/.config/openbox). These two files are a copy of the menu.xml and the autostart.sh, but with addtional stuff I want to change, but could not do in the original files, since those are overwritten at start up.

- The next problem was to copy those new files to the original ones during the boot sequence (menu.xml and autostart.sh) AFTER those two get overwritten with defaults. I needed to find a place where to do this. This place is the /etc/gdm/PreSession/Default. In this file I do the following two commands:
    cp /home/crunchbang/.config/openbox/my-menu.xml /home/crunchbang/.config/openbox/menu.xml
    cp /home/crunchbang/.config/openbox/my-autostart.sh /home/crunchbang/.config/openbox/autostart.sh

- Another problem was that my /etc/mtab was never deleted and thus always appended, leading to an ever growing file (with every boot).

- Thus, I needed a place where I can delete this file everytime the computer is shutdown or restarted. This place is the /etc/gdm/PostSession/Default. In this file I just do the following command:
    sudo rm /etc/mtab

I hope this was clearer now.

Regards,
fladd

Last edited by fladd (2009-01-31 22:48:55)

Offline

#10 2009-01-31 22:37:24

JO
New Member
Registered: 2009-01-30
Posts: 3

Re: Files in casper-rw overwritten in persistent USB installation

Yeah, now I understand and it works!

Thanks fladd for supporting me in this!

/JO

Last edited by JO (2009-01-31 22:55:18)

Offline

#11 2009-01-31 22:49:22

fladd
Member
Registered: 2009-01-19
Posts: 40

Re: Files in casper-rw overwritten in persistent USB installation

Just corrected that (copy and paste error).

Cheers

Offline

#12 2009-02-13 06:39:39

SpecialK
New Member
Registered: 2009-02-13
Posts: 3

Re: Files in casper-rw overwritten in persistent USB installation

Hi,

I'm a new #! user, I'm running from a USB stick, and I'd really like to try this solution.  However, when I try to edit the Default shell script it tells me I do not have permission.

Any help would be greatly appreciated.

Offline

#13 2009-02-13 13:27:22

SpecialK
New Member
Registered: 2009-02-13
Posts: 3

Re: Files in casper-rw overwritten in persistent USB installation

Nevermind, I figured it out.  Works like a charm!

Thanks a lot fladd,

~SpecialK

Offline

#14 2009-02-13 18:39:36

SpecialK
New Member
Registered: 2009-02-13
Posts: 3

Re: Files in casper-rw overwritten in persistent USB installation

If I wanted to make a similar script to backup the menu.xml and autostart.sh to "my-menu.xml" and "my-autostart.sh" at shutdown so I didn't have to remember to save it manually when I made changes, where would be the best place to insert that code?

~SpecialK

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo