how to chroot and mount my hdd in SSH resuce mode

Discussion in 'Site & Server Administration' started by joujoba, Oct 5, 2010.

  1. #1
    hello

    how can i chroot and mount my hdd in SSH resuce mode in order to change the settings?
    thanks
     
    joujoba, Oct 5, 2010 IP
  2. slacker8

    slacker8 Peon

    Messages:
    176
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    first, you need to know your hdd partitions.
    For that you can try "fdisk -l"

    Once you located the partition you want to mount, you need to create a directory on which you'll mount the partition. For example "mkdir /mnt/foo"

    Then you proceed mounting it: "mount /dev/sdXY /mnt/foo", where sdXY is the partition you find with "fdisk -l".

    After that you can chroot into it: "chroot /mnt/foo/"

    This is a the simplest situation (no software raid, etc). YMMV.
     
    slacker8, Oct 6, 2010 IP