I have 2 seperate HD's, both NTFS. D drive has lots of data etc on it, how would I install linux to D drive?

Dani AI

Generated

Short answer and safe plan: installing Linux on the physical disk that Windows shows as D: is fine, provided that D: is truly a separate physical drive (not just a second partition on the same disk) and a full backup exists. Confirm which device is which from a Linux live USB (see the persistent device names and udev/lsblk guidance), then create Linux partitions on that disk and format them with a native Linux filesystem rather than NTFS. (documentation.suse.com)

Filesystems and partitioning: mainstream installers expect a Linux filesystem for the root partition (ext4 is the common default); NTFS is usable for sharing data but is not the normal choice for a root filesystem (Linux access to NTFS is via ntfs-3g or newer kernel drivers and has different semantics). For resizing or reallocating space on an NTFS D: drive, use a modern partition tool (GParted Live or the distro installer) after running Windows’ disk check and making a complete backup — GParted explicitly warns that partition edits can destroy data. (github.com)

Bootloader and MBR: GRUB is normally installed to a disk MBR. To avoid touching the Windows bootloader on the other disk, install GRUB to the Linux disk’s MBR (for example, the installer or grub-install /dev/sdX) and set the BIOS/boot order to that drive; installing GRUB to the first disk will overwrite the Windows MBR and change how the machine boots. If the Windows bootloader is overwritten, it can be restored (Windows XP uses Recovery Console fixmbr/fixboot; newer Windows use Bootrec/Windows RE). (gnu.org)

Practical checklist (no-frills):

  1. Full backup of D:.
  2. Boot a live USB and map disks (lsblk/installer device list).
  3. Run chkdsk in Windows, then use GParted or the installer to shrink/format D: as ext4 (create /, swap, optional /home).
  4. Install Linux and put GRUB where intended (Linux disk MBR to keep Windows untouched).
    A careful, stepwise approach follows and expands on @w1r3sp33d, @kc0arf and @DMR’s points about shrinking, device mapping, and MBR risk. (gparted.org)

Example commands (live session, confirm device names before use):

lsblk -o NAME,SIZE,FSTYPE,MOUNTPOINT
# after confirming the target disk (e.g. /dev/sdb):
grub-install /dev/sdb   # only when certain /dev/sdb is the Linux disk

Recommended Answers

All 9 Replies

I don't know of a distro that will install to/run from a NTFS partition.

Normally I would use a program like Partition Magic to shrink my D drive to how much I need and leave the remainder as unpartitioned space so that Linux can install there.

For example, I had a 40 gig d: on my pc but only 11 gig's of data. I used Partition Magic to shrink my drive to 20 gigs with 20 gigs of "unused space" then I rebooted to my slackware CD and I am off and running.

If you are just gettting started with Linux I suggest you try some live cd's and see how different they can look and feel, it will help you in deciding which one you want to load into the hard drive. Not required, just a suggestion.

OSNews just posted a story on different live cd's a couple days ago here http://www.osnews.com/story.php?news_id=9569

Say I dont care what I have on my D Drive, would I be able to install a linux to it without affecting my C drive, and how?

Hello Gink,

Pleasure talking to you on the IRC by the way.

Windoze sees hard drives as a C: and a D: and so forth. They can be on the same physical disk (two partitions on the same disk), or can be different disks all together. They are defined, depending on what version of Windows you are using, by the Disk Administrator, or FDISK, or whatever you are running in the meantime.

It might be safe to say that your C: is on your Primary IDE, first partition. Then again, it might not be safe to say that. Best way to find out is to look at the hardware and see what IDE channel (Primary or Secondary) and then the partition number. You need to do this for both C: and D:

Linux references volumes in terms of their IDE channel, and their partition number.

/dev/hda is the IDE primary master
/dev/hdb is the IDE pirmary slave

/dev/hdc is the IDE secondary master
/dev/hdd is the IDE secondary slave

If you are using SCSI,

/dev/sda is the SCSI method.

Partition numbers are defined after the device...

/dev/hda3 is the third disk partition on the primary master.
/dev/hdc2 is the second disk partition on the secondary master.

Note that not all partitions on a hard drive are "data" locations. Some companies, like compaq, put a utility partition on the disk that is transparent to the OS.

So, what you need to do is find out what C: is in relation to your hardware... MAYBE /dev/hda1 is C: ... and what D: is... maybe /dev/hdb? and go from there. When installing linux, AVOID any changes to the C: partition.

Christian

Hello Gink,

It might be safe to say that your C: is on your Primary IDE, first partition. Then again, it might not be safe to say that. Best way to find out is to look at the hardware and see what IDE channel (Primary or Secondary) and then the partition number. You need to do this for both C: and D:

So, what you need to do is find out what C: is in relation to your hardware... MAYBE /dev/hda1 is C: ... and what D: is... maybe /dev/hdb? and go from there. When installing linux, AVOID any changes to the C: partition.

Christian

how would I check if its primary or secondary

my D says MBR also, what does that mean

Hi,

What OS are you running for Windoze?

MBR is Master Boot Record. That could be a problem if you format it.

Christian

windows XP

how would I check if its primary or secondary

As kc0arf said, the most definitive way to determine that would be to open the computer's case and look at how the drives are connected.

Assuming that you have IDE (as opposed to SATA) drives, there will be two connectors on the mothereboard for the IDE ribbon cables. One of those connectors is the Primary IDE channel, the other is the Secondary channel, and you can have a maximun of two drives connected to each. You can usually determine which connector is Primary and Secondary by looking for labels on the mobo (near the connectors) that say something like IDE 0 and IDE 1; the lower number is the Primary. Which device on each channel is the Master and which is the Slave is usually determined by jumper settings on the drives tehmselves.

If both of your hard drives are connected to the mobo by the same ribbon cable, then they are both on the Primary IDE channel. The drive jumpered as Master will be C: (Primary Master) and the drive jumpered as Slave will be D: (Primary Slave).

If the drives are connected to the mobo on two different ribbon cables, you'll first have to determine which cable is on which IDE channel. After that, if the second drive is the only device connected to the Secondary cable, it will be the Secondary Master; if you have another device like a CD-ROM drive attached to the Secondary cable as well, you'll have to check the jumper settings on each device to determine the Master/Slave relationship.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.