-
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?
-
Junior Member
registered user
/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.
-
Re: Any way to mount and chroot a entire hard drive?

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 This will mount all the partitions listed in the chrooted Linux's /etc/fstab.
-
Similar Threads
-
By ajonline in forum General Support
Replies: 9
Last Post: 04-05-2005, 01:14 AM
-
By Racer88 in forum General Support
Replies: 6
Last Post: 03-08-2005, 12:09 PM
-
By glidetothehoop in forum Hdd Install / Debian / Apt
Replies: 2
Last Post: 12-24-2004, 02:41 PM
-
By fourthirtysix in forum General Support
Replies: 0
Last Post: 05-24-2004, 03:24 AM
-
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
-
Forum Rules

Dell EMC PowerEdge R740 8 Bay Server w/ 32GB RAM 2x GOLD 6132 2x 1600W PSU H730p
$499.88

Dell EMC PowerEdge R440 Xeon silver 4215 2.5GHz 16 GB ram 2x 550W PSU No HDD
$275.00

Dell Poweredge R630 2x Xeon E5-2680 v3 2.5ghz 24-Cores / 64gb / Raid / 2x 1Tb
$374.99

Dell Poweredge R620 10x 2.5" bay with 256GB (16x16gb) DDR3, 2x E5-2690v2, H710
$349.99

Dell PowerEdge R730XD 28 Core Server 2X Xeon E5-2680 V4 H730 32GB RAM No HDD
$378.93

Dell PowerEdge C4130 1U AI GPU Server | 2x E5-2680 v3 | 32gb Ram | 2x 1600W
$409.99

Dell PowerEdge R640 8xSFF Server Barebone 2 x Heat Sink w / 2x 1100W PSU
$315.00

Dell Poweredge R630 2x Xeon E5-2680 v3 2.5ghz 24-Core | HBA330 | No RAM or HDD
$149.99

Dell Poweredge C4130 2x LGA2011-3 1U 4x GPU Rackmount Server CTO (NO CPU/NO RAM)
$299.95

Dell EMC VxRail E560F 10-SFF 2*Gold 6230R 2.1GHz No RAM HBA330 iDrac Ent Server
$349.99