-
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?
![Quote](images/misc/quote_icon.png)
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
![HP Workstation Z640 2x Xeon E5-2623V4 32GB Ram 2x256GB SSD Quadro K420 No OS GA2 picture](/store/img/rIQAAOSwN9Nlnw4a/s-l225//HP-Workstation-Z640-2x-Xeon-E5-2623V4-32GB-Ram-2x2.jpg)
HP Workstation Z640 2x Xeon E5-2623V4 32GB Ram 2x256GB SSD Quadro K420 No OS GA2
$164.98
![HP Workstation Z640 2x Xeon E5-2623V4 32GB Ram 2x 256GB SSD Quadro P620 Linux GA picture](/store/img/rIQAAOSwN9Nlnw4a/s-l225//HP-Workstation-Z640-2x-Xeon-E5-2623V4-32GB-Ram-2x-.jpg)
HP Workstation Z640 2x Xeon E5-2623V4 32GB Ram 2x 256GB SSD Quadro P620 Linux GA
$186.99
![Dell Precision 5810 Workstation Xeon E5-1650 6C 3.5GHz 16GB 500GB Win10 K2200 picture](/store/img/60cAAOSwEIll-JnV/s-l225//Dell-Precision-5810-Workstation-Xeon-E5-1650-6C-3-.jpg)
Dell Precision 5810 Workstation Xeon E5-1650 6C 3.5GHz 16GB 500GB Win10 K2200
$115.94
![E5-2699V4 Intel Xeon Processor 55M Cache, 2.20 GHz SR2JS CM8066002022506 picture](/store/img/HmIAAOSwls5frj~X/s-l225//E5-2699V4-Intel-Xeon-Processor-55M-Cache-2-20-GHz-.jpg)
E5-2699V4 Intel Xeon Processor 55M Cache, 2.20 GHz SR2JS CM8066002022506
$155.00
![Intel Xeon X5690 SLBVX 3.46GHz 6-Core 12MB 6.4GT/s LGA1366 CPU Processor picture](/store/img/IhwAAOSwgaFmk~OU/s-l225//Intel-Xeon-X5690-SLBVX-3-46GHz-6-Core-12MB-6-4GT-s.jpg)
Intel Xeon X5690 SLBVX 3.46GHz 6-Core 12MB 6.4GT/s LGA1366 CPU Processor
$20.00
![Intel Xeon E5-2680 V4 CPU 2.4~3.3GHz 14-Core 35M LGA 2011-3 R3 Server SR2N7 120W picture](/store/img/hLcAAOSwA81iMQ7h/s-l225//Intel-Xeon-E5-2680-V4-CPU-2-4-3-3GHz-14-Core-35M-L.jpg)
Intel Xeon E5-2680 V4 CPU 2.4~3.3GHz 14-Core 35M LGA 2011-3 R3 Server SR2N7 120W
$15.99
![Intel Xeon Gold 6138 2.0GHz 27.5MB 20-Core 125W LGA3647 SR3B5 picture](/store/img/U4wAAOSw~HJka8-T/s-l225//Intel-Xeon-Gold-6138-2-0GHz-27-5MB-20-Core-125W-LG.jpg)
Intel Xeon Gold 6138 2.0GHz 27.5MB 20-Core 125W LGA3647 SR3B5
$37.00
![Intel Xeon E5-2680 V3 2.50Ghz 12 Core 30MB Cache LGA 2011-3 CPU SR1XP Tested picture](/store/img/M1EAAOSwdAdjG8AH/s-l225//Intel-Xeon-E5-2680-V3-2-50Ghz-12-Core-30MB-Cache-L.jpg)
Intel Xeon E5-2680 V3 2.50Ghz 12 Core 30MB Cache LGA 2011-3 CPU SR1XP Tested
$5.90
![Intel Xeon E5-2698 V4 2.20GHz 50MB 20 Core 9.6GT/s 135W CPU Processor SR2JW picture](/store/img/MjIAAOSwDalmlVdh/s-l225//Intel-Xeon-E5-2698-V4-2-20GHz-50MB-20-Core-9-6GT-s.jpg)
Intel Xeon E5-2698 V4 2.20GHz 50MB 20 Core 9.6GT/s 135W CPU Processor SR2JW
$84.99
![Intel Xeon E5-2699A V4 2.40GHz 55MB 22 Core 9.6GT/s 145W CPU Processor SR30Y picture](/store/img/fmgAAOSwv2ZmlZW1/s-l225//Intel-Xeon-E5-2699A-V4-2-40GHz-55MB-22-Core-9-6GT-.jpg)
Intel Xeon E5-2699A V4 2.40GHz 55MB 22 Core 9.6GT/s 145W CPU Processor SR30Y
$189.99