Click to See Complete Forum and Search --> : Preparing for a Dual-Boot PC w/ FDISK?


fisherman033
08-19-2003, 12:04 AM
hello, i'm new.. please correct me if i'm wrong about what i have in mind here, thanks.

i am going to be attempting an install of a winxp/debian system that currently runs winxp on two hard drives. i am intending to partition both drives (as primary) and format them with DOS FDISK for C:, and LINUX FDISK for DEV/HDB "aka D:", then do a clean install of both OSes with winxp being the first install.

i have read it is best to partition the drive "c:" for winxp with DOS FDISK, leave drive "d:" alone (use linux fdisk for that), and to select FAT32 over NTFS so i can mount FAT32 from within debian. i am under the impression that NTFS 5.0 is inaccessable (non-mountable) from within linux.

i am vaguely aware of the partitioning utility within WINXP, and i assume that it is a replacement for fdisk. i have spent quite some time trying to get a grasp of using both dos and linux fdisk, i still have a fuzzy idea about it (lots of contradictions in what i've read so far, heh), but i figure i might as well go all the way with it for the learning experience :)

okay, so if what i have in mind this far gets me to the point of installing the OS'es, i would just like to confirm with you guys that the whole basic process goes as follows, as i'm still pretty uncertain about a few of these steps:


01. boot DOS FDISK from A:
02. partition c: 100% as PRIMARY / FAT32
03. reboot with DOS FDISK from A:
04. format c:
05. reboot with winxp install cd
06. install winxp

not really 100% clear about the rest:

07. reboot with LINUX FDISK from A:
08. parition dev/hdb1 as PRIMARY / EXT3FS, and parition hdb2 as EXTENDED / swap?
09. format dev/hdb
10. reboot with debian install cd

or is the paritioning and formatting job of fdisk taken care of in the debian install cd?

11. install debian

- configure GRUB as boot loader
- mount dev/hda (winxp) within debian (i'll worry about that later)



thats about it. any corrections/clairification or confirmation that i'm on the right track would really help alot. thanks :)

psi42
08-19-2003, 12:49 AM
Originally posted by fisherman033
hello, i'm new.. please correct me if i'm wrong about what i have in mind here, thanks.

i am going to be attempting an install of a winxp/debian system that currently runs winxp on two hard drives. i am intending to partition both drives (as primary) and format them with DOS FDISK for C:, and LINUX FDISK for DEV/HDB "aka D:", then do a clean install of both OSes with winxp being the first install.


I'd like to mention a few things here. First, linux does not refer to the primary slave as DEV/HDB, but as /dev/hdb (It is case sensitive and you need the first "/" as this is where the root filesystem is mounted. (Mount points are fun! :))

Okay, I'm going to try and explain mount points now. I probably won't do a very good job. :)

When you say "I'm mounting /dev/hdb6 at /home," what you are doing is making the /home directory a "portal" of sorts into /dev/hdb6. So everything you write to /home will be written to the root directory of /dev/hdb6.

If you don't mount anything at /home, then everything written to /home will just be written to the / partition. /home will just be a regular directory. As far as the system is concerned, it doesn't matter whether /home is it's own partition or not.

The root filesystem is mounted at /
That's why everything starts with a /

Okay, there's mountpoints for you. I hope I didn't muddle it up too much. :)

In linux, everything is part of the same file heirarchy. There are no "separate" A: or E: drives. The floppy is /dev/fd0, the harddrives are /dev/hda, /dev/hdb, /dev/hdc, etc...

Also, the second hard disk is not necessarily "D:". Windoze will refer to the second fat/fat32/ntfs partition it finds as D:, regardless of where it is located.


i have read it is best to partition the drive "c:" for winxp with DOS FDISK, leave drive "d:" alone (use linux fdisk for that), and to select FAT32 over NTFS so i can mount FAT32 from within debian. i am under the impression that NTFS 5.0 is inaccessable (non-mountable) from within linux.


You should use linux fdisk, so you can assign the correct partition type (dos fdisk doesn't do this). You will also need linux utilities to create the correct filesystem.

NTFS is only accessable read-only under linux. Writing to NTFS is possible, but at the moment it is "dangerous." Micro$oft has not released any docs on NTFS, so it's really tough to make it work in linux. So IMHO FAT32 would be best in this situation.


i am vaguely aware of the partitioning utility within WINXP, and i assume that it is a replacement for fdisk. i have spent quite some time trying to get a grasp of using both dos and linux fdisk, i still have a fuzzy idea about it (lots of contradictions in what i've read so far, heh), but i figure i might as well go all the way with it for the learning experience :)


Just go for it. Since you are wiping the disks anyway, you have nothing to lose:).



okay, so if what i have in mind this far gets me to the point of installing the OS'es, i would just like to confirm with you guys that the whole basic process goes as follows, as i'm still pretty uncertain about a few of these steps:


01. boot DOS FDISK from A:
02. partition c: 100% as PRIMARY / FAT32
03. reboot with DOS FDISK from A:
04. format c:
05. reboot with winxp install cd
06. install winxp

Sounds OK to me. I have never installed winxp though. :)


not really 100% clear about the rest:

07. reboot with LINUX FDISK from A:


Not A: :) Linux does not use "drive letters."
I have never installed debian, but it almost certainly comes with fdisk. You might also want to use cfdisk as it has a nice menu-based interface.


08. parition dev/hdb1 as PRIMARY / EXT3FS, and parition hdb2 as EXTENDED / swap?

Sounds OK. However, I would recommend more than 2 partitions. What I would do is (assuming 40GB HD):

/dev/hdb1 primary 512MB /boot
/dev/hdb5 logical 19GB /
/dev/hdb6 logical 10GB /home
/dev/hdb7 logical 10GB /mnt/data
/dev/hdb8 swap 512MB

The big advantage to a separate /home partion is that if you reinstall, all your stuff will still be there. Same for /mnt/data.

That's just my recommendation. Everyone likes their system partitioned differently, some like /usr and /var partitions as well. There are good reasons for that, but I am always afraid I will run out of room on one of them.



09. format dev/hdb


Close. You can't format the disk itself, only the partitions on it. For example, if you were to use the partitioning suggested above, with an ext3 filesystem, you would do:

mke2fs -j /dev/hdb1
mke2fs -j /dev/hdb5
mke2fs -j /dev/hdb6
mke2fs -j /dev/hdb7
mkswap /dev/hdb8

But you will probably use the debian installer to make the filesystems.


10. reboot with debian install cd


Actually just start with the debian cd, it should come with everything you need for partitioning and formatting.


or is the paritioning and formatting job of fdisk taken care of in the debian install cd?


I would assume so...


11. install debian

- configure GRUB as boot loader
- mount dev/hda (winxp) within debian (i'll worry about that later)


Like I said, I haven't installed debian, so I can only give you a general idea what to expect:

There will probably be a menu-based GRUB configuration.

For winxp, you will be mounting /dev/hda1, not dev/hda


This is getting to be a really long post. I hope I'm not boring you to death. :)


thats about it. any corrections/clairification or confirmation that i'm on the right track would really help alot. thanks :)

Welcome to Linux! I hope you enjoy it. :)


~psi42

fisherman033
08-19-2003, 01:27 AM
psi42, thanks alot for taking the time to clear everything up for me.

rid3r
08-19-2003, 01:28 AM
You can skip the fdisk part for both OS-es, since XP lets you select the target hardrive (C:\), as far as I remeber, it will do partitioning and formatting for you.
I think psi42 is right Debian installer should have both fdisk and cfdisk, the last one is much friendlier. Just delete the hdb1 (NTFS) partition and partition it for Linux.
You can either keep it simple and create two primary partitions:
hdb1 (Linux extended filesystem 83), that's your "/" (root)
hdb2 (Linux swap)
Or use the psi42 scheme with a little correction, the partition numbering (if you have only one primary partition on hda or C:\ in Windows) will be something like this:
/dev/hdb1
/dev/hdb3
/dev/hdb4
/dev/hdb5
You should not be worried about this, cfdisk will number them for you.
Search the forum on "partitioning".
I hope you will make Linux your home. :)

ps. disregard my spelling.

fisherman033
08-19-2003, 01:36 AM
thanks to you as well rid3r, i'm glad you noted the easy way to do this.. i wasnt aware of that

o0zi
08-19-2003, 02:42 AM
It's probably better to use reiserfs instead of ext3, as it has a large improvement in performance with files smaller than 1KB.

Also, the boot partition doesn't need to be as large as 512MB (by that I mean the one mounted on /boot). It can be 32MB if you format it with ext2, or 64MB if you format it with ext3 or reiserfs (well, that's what the Gentoo Linux installation guide advises).

If you want to learn more about the way Linux organizes files, look at this (http://www.justlinux.com/nhf/Filesystems/Directory_Navigation.html) and this (http://www.justlinux.com/nhf/Filesystems/Filesystems_Directories_and_Devices.html), both of which are JustLinux help files.