fixing broken rc.local0 in a frugal install

Booting, installing, newbie
Post Reply
Message
Author
redrum
Posts: 56
Joined: Mon 02 Oct 2006, 11:16
Location: Athens , Grecce

fixing broken rc.local0 in a frugal install

#1 Post by redrum »

Hello again !

I managed to screw my rc.local0 . What that means is that during boot the system halts there ... forever !! I may be naive , because I booted puppy from cd in order to fix my problem ...but since all personal settings are saved in pup_save file and this being a single file means that I actually cannot edit my rc.local0 :(
Hopefully I kept a backup 2 days ago but I would really like to know if I the .2fs file can be extracted and work seperate in files and pack it again. As I said I have the alternative to restore my pup_save.2fs but I am curious to know what else can be done
:idea:

muggins
Posts: 6724
Joined: Fri 20 Jan 2006, 10:44
Location: hobart

#2 Post by muggins »

when you're changing important files, it's good to make a second backup copy, rc.local0.bak

however, i think you can boot your cdrom with the option pfix=ram, then maybe mount the corrupted pup_save.2fs file. i think it's something like:

mkdir tmpmnt
losetup /dev/loop2 pup_save.2fs
mount -t squashfs /dev/loop2 tmpmnt


then, if this went OK, you should be able to see the file structure in directory tmpmnt, and replace /etc/rc.d/rc.local0, with the unchanged cdrom's version. (at least i hope this works!)

redrum
Posts: 56
Joined: Mon 02 Oct 2006, 11:16
Location: Athens , Grecce

#3 Post by redrum »

You are right about the backup ... I have a renamed file there. But the problem is that the 2.fs is not corrupted . I just added shoutcast server to start during boot (/opt/shout/sc_serv) and after adding this for a strange reason it halts there :shock:
I have already loaded puppy with pfix=ram but my .2fs file is not corrupted so there is nothing to fix there !

User avatar
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

#4 Post by Dougal »

There are two things you can do:
1) Remove the modified file: go to /initrd/pup_rw/etc/rc.d/ and delete the rc.local0 you'll find there -- then reboot.
2) Overwrite it with a "pristine" copy: go to /initrd/pup_ro2/etc/rc.d/ and copy the rc.local0 you'll find there into your /etc/rc.d/. (your pup_2xx.sfs is most likely mounted on /initrd/pup_ro2, but it might also be pup_ro1)
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind

redrum
Posts: 56
Joined: Mon 02 Oct 2006, 11:16
Location: Athens , Grecce

#5 Post by redrum »

I think I'm missing something. Let me clear it up to be sure that is not due to my expression. I cannot boot with my .2fs file because it halts in the rc.local step. If I use the cd of Puppy with pfix=ram I don't load my personal settings (since it cannot boot like this) so I don't think /initrd/pup_ro2 will do anything if I play with it.
I have no problem now since I already restored to previous backup but my question that still remains is that if my saved .2fs file can be extracted somehow-somewhere so I can retrieve personal data out of a system that doesn't boot. It may seem silly question but it's interesting for me to know :shock:

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#6 Post by MU »

yes, use the bold commands from muggins message above to mount pup_save.2fs.

Mark

Post Reply