• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

mounting a drive in a live cd

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

UnseenMenace

UnseenModerator
Joined
Apr 23, 2001
How do I mount a hard disk with Windows installed on it in a live CD enviroment for data recovery ?
 
i belive gentoo has ntfs bult into it,

i think you can just use ..

mkdir /mnt/win
mount -t ntfs /dev/hda /mnt/win


but you would have to use sudo su root (hope you can do that..)
 
wizard james said:
i belive gentoo has ntfs bult into it,

i think you can just use ..

mkdir /mnt/win
mount -t ntfs /dev/hda /mnt/win

but you would have to use sudo su root (hope you can do that..)

How would this work ?... I do not belive that you can write to a Live CD which you would need to do if creating a directory, or am I missing something ?.
The Hard Disk I have has a Windows installation of NTFS that does not boot, I can view the contents of the drive but not access it.. im intend to copy files over a network
 
klingens said:
same way as anywhere else:
mount /dev/?d?? /mountpoint
If the LiveCD has ntfs support compiled in.

That works, thank you once again :D
 
Yes, (most) liveCDs make a ramdisk, but this is really just for dynamic files that linux ordinarily expects to be able to write to in the process of basic system operation. But the filesystem should use /proc/mounts -- which is in the virtual /proc filesystem already, anyway (and therefore won't be a problem for liveCDs) -- when mapping a directory to a device (or not mapping it).

Slightly off-topic here, but a nifty idea that some liveCDs use is unionfs, a kernel patch that allows you (among other things) to have an "override" folder; it's difficult to describe without an example: you have two existing, physical directories /foo and /home/userbar/baz. You mount /foo readonly and /home/userbar/baz as read-write, "on top" of /foo, as as /media/union. Now when you look into /media/union, what you see are the contents of both /foo and /home/userbar/baz. If there should be a file that exists on both, the "higher" mount (in this case /home/userbar/baz; you remember what I said about "on top"?) takes precedence. When writing to /media/union, you write to a branch that is loaded read-write, in this case /home/usrbar/baz, in this way /foo is not modified at all.

One of the beautiful things you can do with this is take an entire filesystem, make a small ramdisk and mount it under /media/union, mount a compact-flash card, and unionfs-mount your filesystem read-only, the compact-flash read-write, and then chroot or pivot_root into /media/union. In doing so we achieve a read-only filesystem where the sum of all changes since its creation are stored on the external CF card, ideal for liveCDs. In fact there are some liveCDs that use this concept already, slax is one IIRC.
 
Back