Results 1 to 4 of 4

Thread: Any way to mount and chroot a entire hard drive?

Hybrid View

  1. #1
    Junior Member
    Join Date
    Mar 2003
    Posts
    6

    Any way to mount and chroot a entire hard drive?

    For example, i have this right now:

    Code:
    Device Boot      Start         End      Blocks   Id  System
    /dev/hda1   *           1         853     6851691    7  HPFS/NTFS
    /dev/hda2             854        7860    56283727+   c  W95 FAT32 (LBA)
    /dev/hda3            7861       14946    56918295    5  Extended
    /dev/hda5            7861       12115    34178256   83  Linux
    /dev/hda6           12116       14824    21760011   83  Linux
    /dev/hda7           14825       14946      979933+  82  Linux swap
    Am i able to do the following after booting from the knoppix cd?:

    % mount /dev/hda /mnt/hda5
    % chroot /mnt/hda5

    I did try it, but i get some kind of 'bad superblocks or too many filesystems mounted error'.

    I am able to mount partitions separately and chroot into them, like /dev/hda5, or /dev/hda6. Was wondering if i could do the whole drive as /dev/hda.

    Thanks.

    /edit: a thought just occured to me. It might be because of the windows partitions that it won't let me mount the whole drive. Am i right?

  2. #2
    Junior Member registered user
    Join Date
    Sep 2003
    Location
    Nova Scotia, Canada
    Posts
    11
    /dev/hda is not a partition
    /dev/hda5 is a partition
    mount /dev/hda5
    Or more properly, as root:
    mount -t reiserfs /dev/hda5 /mnt/hda5
    Replace filesystem type and mount point with
    whatever is applicable to your system (/etc/fstab)
    Once mounted, you can chroot into it.
    Didn't you try clicking on the icon first?
    Much simpler.

  3. #3
    Member registered user
    Join Date
    May 2003
    Posts
    35

    Re: Any way to mount and chroot a entire hard drive?

    Quote Originally Posted by sk545
    For example, i have this right now:

    Code:
    Device Boot      Start         End      Blocks   Id  System
    /dev/hda1   *           1         853     6851691    7  HPFS/NTFS
    /dev/hda2             854        7860    56283727+   c  W95 FAT32 (LBA)
    /dev/hda3            7861       14946    56918295    5  Extended
    /dev/hda5            7861       12115    34178256   83  Linux
    /dev/hda6           12116       14824    21760011   83  Linux
    /dev/hda7           14825       14946      979933+  82  Linux swap
    Am i able to do the following after booting from the knoppix cd?:

    % mount /dev/hda /mnt/hda5
    % chroot /mnt/hda5

    I did try it, but i get some kind of 'bad superblocks or too many filesystems mounted error'.

    I am able to mount partitions separately and chroot into them, like /dev/hda5, or /dev/hda6. Was wondering if i could do the whole drive as /dev/hda.

    Thanks.

    /edit: a thought just occured to me. It might be because of the windows partitions that it won't let me mount the whole drive. Am i right?
    You are right in thinking /dev/hda is the ENTIRE drive but it cannot be mounted, only the filesystems under it.

    In order to accomplish thiis you should mount the filesystem that holds the Linux system you are changing to - which looks like maybe it's /dev/hda5. Make sure you mount /dev/hda5 as a RW partition on the base system, chroot to it (i.e. chroot /mnt/hda5).

    Now modify the chrooted Linux systems /etc/fstab file to mount the partitions under the new chrooted environment and issue the command
    Code:
    mount -a
    This will mount all the partitions listed in the chrooted Linux's /etc/fstab.

  4. #4
    Junior Member
    Join Date
    Mar 2003
    Posts
    6
    thx all.

Similar Threads

  1. Unable to Mount Hard Drive Please Help
    By ajonline in forum General Support
    Replies: 9
    Last Post: 04-05-2005, 01:14 AM
  2. Hard drive wont mount
    By Racer88 in forum General Support
    Replies: 6
    Last Post: 03-08-2005, 12:09 PM
  3. Can't Get Hard Drive to Mount When Booting Up
    By glidetothehoop in forum Hdd Install / Debian / Apt
    Replies: 2
    Last Post: 12-24-2004, 02:41 PM
  4. sata hard drive won't mount ...
    By fourthirtysix in forum General Support
    Replies: 0
    Last Post: 05-24-2004, 03:24 AM
  5. Auto mount of hard disk drive
    By Mycroft1855 in forum Customising & Remastering
    Replies: 1
    Last Post: 02-27-2003, 05:23 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


GIGABYTE A520M DS3H AC AMD AM4 Motherboard mATX picture

GIGABYTE A520M DS3H AC AMD AM4 Motherboard mATX

$59.99



Intel H310 LGA1151 8-9th Gen DDR4 M.2 NVMe mATX Motherboard IO Shield Battery picture

Intel H310 LGA1151 8-9th Gen DDR4 M.2 NVMe mATX Motherboard IO Shield Battery

$54.99



GIGABYTE Z790 AORUS ELITE AX LGA 1700 Intel Z790 ATX Motherboard with DDR5 picture

GIGABYTE Z790 AORUS ELITE AX LGA 1700 Intel Z790 ATX Motherboard with DDR5

$189.99



ASUS PRIME Z490-V Motherboard Intel Z490 10th gen DDR4 LGA 1200 ATX w/ IO Shield picture

ASUS PRIME Z490-V Motherboard Intel Z490 10th gen DDR4 LGA 1200 ATX w/ IO Shield

$84.99



GIGABYTE B365 HD3 LGA1151 Intel 9th Gen motherboard picture

GIGABYTE B365 HD3 LGA1151 Intel 9th Gen motherboard

$59.99



MSI B550M PRO-VDH Micro-ATX Motherboard - AMD AM4, Ryzen 5000/4000/3000 Ready, P picture

MSI B550M PRO-VDH Micro-ATX Motherboard - AMD AM4, Ryzen 5000/4000/3000 Ready, P

$71.49



⁠Intel H81 Motherboard M.2 NVMe LGA 1150 mATX w/ IO Shield (Random Slot Color)⁠ picture

⁠Intel H81 Motherboard M.2 NVMe LGA 1150 mATX w/ IO Shield (Random Slot Color)⁠

$29.90



ASUS PRIME B360M-C MicroATX Intel LGA1151 DDR4 HDMI VGA USB RJ-45 Audio picture

ASUS PRIME B360M-C MicroATX Intel LGA1151 DDR4 HDMI VGA USB RJ-45 Audio

$34.99



ASUS B85M-G / B85M-G PLUS LGA1150 DDR3 Micro ATX Motherboard HDMI Support 4thCPU picture

ASUS B85M-G / B85M-G PLUS LGA1150 DDR3 Micro ATX Motherboard HDMI Support 4thCPU

$45.00



Dell XPS 8940 Desktop Motherboard Intel H470 LGA1200 DDR4 K3CM7 KV3RP 427JK picture

Dell XPS 8940 Desktop Motherboard Intel H470 LGA1200 DDR4 K3CM7 KV3RP 427JK

$154.99