Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   CentOS (http://www.linux-archive.org/centos/)
-   -   CentOS Live CD for System Rescue - How to get full root access to HD? (http://www.linux-archive.org/centos/191516-centos-live-cd-system-rescue-how-get-full-root-access-hd.html)

"Lanny Marcus" 11-11-2008 12:04 PM

CentOS Live CD for System Rescue - How to get full root access to HD?
 
Booting from the CentOS 5.2 Installation DVD (or the first
Installation CD), one can type "linux rescue" and then "chroot
/mnt/sysimage" and have full root access to the OS on the HD. For
future reference, I would like to know what I did wrong, the past
couple of days, when trying to use the CentOS 5.2 i386 Live CD, for
rescue. From a terminal, "su -" did not seem to get me root access to
the hard drive. What command should I have used, with the Live CD? The
access I had was read only. (As it turns out, I could have fixed the
problem, without the LiveCD, but I didn't know that, 3 days ago....
:-) ) TIA. Lanny
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

Robert 11-11-2008 01:10 PM

CentOS Live CD for System Rescue - How to get full root access to HD?
 
Lanny Marcus wrote:

Booting from the CentOS 5.2 Installation DVD (or the first
Installation CD), one can type "linux rescue" and then "chroot
/mnt/sysimage" and have full root access to the OS on the HD. For
future reference, I would like to know what I did wrong, the past
couple of days, when trying to use the CentOS 5.2 i386 Live CD, for
rescue. From a terminal, "su -" did not seem to get me root access to
the hard drive. What command should I have used, with the Live CD? The
access I had was read only. (As it turns out, I could have fixed the
problem, without the LiveCD, but I didn't know that, 3 days ago....
:-) ) TIA. Lanny


Referring to one of your earlier posts,

[centos@localhost ~]$ mount
/dev/mapper/livecd-rw on / type ext3 (rw,noatime)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
/dev/hdc on /mnt/live type iso9660 (ro)
/dev/hda2 on /mnt/disc/hda2 type ext3 (ro)
/dev/mapper/VolGroup00-LogVol00 on /mnt/lvm/VolGroup00-LogVol00 type ext3 (ro)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)

the boot partition, /dev/hda2 was mounted Read-Only (ro).
To work around that little problem, simply:
# mount /dev/hda2 -o rw,remount
which remounts the partition Read-Write so you can work with it instead
of only observe.
Now, I believe the Live CD is missing the chroot command. This means
you have to do the "bookkeeping" manually. The grub.conf file (normally
at /boot/grub/grub.conf) will now appear at
/mnt/disc/hda2/grub/grub.conf. Note that there is no "/boot" in that path.


And yes, the farther you are from the monitor, the clearer it all becomes.

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

"Lanny Marcus" 11-11-2008 02:58 PM

CentOS Live CD for System Rescue - How to get full root access to HD?
 
On Tue, Nov 11, 2008 at 9:10 AM, Robert <kerplop@sbcglobal.net> wrote:
> Lanny Marcus wrote:
>> Booting from the CentOS 5.2 Installation DVD (or the first
>> Installation CD), one can type "linux rescue" and then "chroot
>> /mnt/sysimage" and have full root access to the OS on the HD. For
>> future reference, I would like to know what I did wrong, the past
>> couple of days, when trying to use the CentOS 5.2 i386 Live CD, for
>> rescue. From a terminal, "su -" did not seem to get me root access to
>> the hard drive. What command should I have used, with the Live CD? The
>> access I had was read only. (As it turns out, I could have fixed the
>> problem, without the LiveCD, but I didn't know that, 3 days ago....
>> :-) ) TIA. Lanny

<snip (output of mount command)

> the boot partition, /dev/hda2 was mounted Read-Only (ro).
> To work around that little problem, simply:
> # mount /dev/hda2 -o rw,remount
> which remounts the partition Read-Write so you can work with it instead of
> only observe.

Thanks!

> Now, I believe the Live CD is missing the chroot command. This means you
> have to do the "bookkeeping" manually. The grub.conf file (normally at
> /boot/grub/grub.conf) will now appear at /mnt/disc/hda2/grub/grub.conf.
> Note that there is no "/boot" in that path.

Yes. The paths were very different, when running on the Live CD.

> And yes, the farther you are from the monitor, the clearer it all becomes.

Many years ago, I bought a handheld VHF radio transceiver. In the
manual, is said something like, "if you get frustrated, put the radio
down and go get a cup of coffee". Distance from the problem
frequently helps... I appreciate your input!
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


All times are GMT. The time now is 10:06 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.