Partitioning/Formatting for First Install of Linux on empty NTFS partition
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Partitioning/Formatting for First Install of Linux on empty NTFS partition
HDD 1
Partition 1 C:WinXP system (registry & installed programs)
Partition 2 D:My Files (my documents, email store, etc.)
HDD 2
Partition 1 E:Backups (a duplicate of partition D:) Also contains the pagefile
Partition 2 F:This used to contain system image files of C: I moved those image files to a passport
I now want to install Linux on this empty 171GB NTFS partition (HDD2 Partition 2, F:)
I gather that in Linux, the hard drives are referred to as hda1, hda2, etc., is that right? To me, Partitions and Logical drives are the same thing, but I'm not sure that's true in Linux - I read something about logical "partitions" spanning physical partitions?
I have made a bootable (I hope) CD containing GParted. (I downloaded an .ISO image and burned/installed it on the CD, using the ISO function of an old Roxio program.)
My Question:
What do I have to do to HDD2, Partition 2, (F:) to enable me to install a Linux distro (probably a form of Ubuntu)?
Please spell things out in detail - I don't know much about Linux yet. I do NOT know how to access root, cfdisk, I don't know where cfdisk, or mkfs.ext3 reside, so I do NOT know HOW to execute the following:
As root: cfdisk /dev/hda
Change the type to 83 for hda1 and write. Exit out and then run your mkfs.ext3 against the hard drive to format it.
I used to use the command line with DOS, so I'm not unfamiliar with it, I just haven't used it in a long time and never with Linux. Do I even need the command line for this if I have GParted? Does GParted contain cfdisk? What about mkfs.exe3? What is "type 83" - is that ext3?
Can I use the empty NTFS Partition from the Linux install disk without pre-formatting it? Or should I use WinXP to DELETE that partition beforehand to create free space in which to create the Linux partitions? Will 171GB be enough for all my Linux files? (Just to learn Linux - later this year I'm building a new machine and then I'll just run XP as a VM (I hope - never done that either)). Is 171GB enough to create EXTRA partitions to try out a couple of different distros? If so, how much space do I need for each one and can those all access the same personal files partition/area?
I also prefer my stuff (my non-system files of all kinds) to reside on a separate logical/physical partition, such that if I image my Linux system partition, my personal files will NOT be included in the image. I want to back them up a different way - maintaining an uncompressed identical COPY of this data on a separate partition. (with the new machine I will try to use RAID - also new to me for the system, but will still need my backup copies and system images, I think?).
It looks like I'll need the following four partitions: (1) the Linux system files, (2) the swap file, (3) my Linux non-system personal files, and (4) backup files (backup system image files, and backup personal files). AND a few partitions for trying different distros (how big for each?) Oh there is also \home ? Is this a partition or a directory?
AND... what will all this do to my MBR? I don't even know what is in it, but I assume it must contain disk and partition information. Will I have to go into the BIOS to set up a dual boot??? I'm at a loss until I understand the mechanics of some of this stuff better.
I'm pretty confused as to how to go about this. I will appreciate any help you guys can offer.
I gather that in Linux, the hard drives are referred to as hda1, hda2, etc., is that right? To me, Partitions and Logical drives are the same thing, but I'm not sure that's true in Linux - I read something about logical "partitions" spanning physical partitions?
partition naming depends upon your HD type, if it is SATA the partitions would be named like /dev/sda1.. so on or if PATA they would be /dev/hda1 .. so on.
If you want to install Linux for practice you can install it as a virtual machine on your windows OS, use VMWARE or oracle virtual machine for that and you don't have to format your existing ntfs partition + easy install i.e no need to define partitions(/root,/boot,/swap,/home) as you are new to linux.
And even if you chose it to install on your harddisk you need to delete the existing NTFS partition. Rest will be done when you mount your CD/DVD to your drive.
171GB is more than enough to carry out your practice.
HDD1 will be /dev/hda or /dev/sda, and HDD2 will be /dev/hdb or /dev/sdb. Your F: drive is /dev/hdb2 or /dev/sdb2 as it's the second partition.
If you've got a Ubuntu live cd, it will have Gparted on it. Boot your Pc with the cd in it, and you should see a Linux desktop. You can find Gparted in the application menu under System Tools. You can use that to delete the partition, and create a new ext4 partition in its place. The type of partition will be primary, as opposed to extended. You'll need to make the new partition bootable.
/home is a directory (note that forward slashes are used in Linux paths). Each user has their own folder in the home directory. You can put your home folder in a separate partition if you want.
You don't need to get into the BIOS. The MBR is at the beginning of your hard disk. It will be updated by Gparted, so you don't need to do that yourself.
Thank you all for the great information. See if I have this right...
(F:, the partition I'll be using for Linux, is the 2nd partition on my 2nd physical hard drive (WD IDE slave drive).)
---------------------------------------------------------------------------------------------------
I heard: "partition naming depends upon your HD type, if it is SATA the partitions would be named like /dev/sda1.. so on or if PATA they would be /dev/hda1 .. so on."
......(What about for IDE drives??)......
......(right now I only have IDE (SATA on new PC, when I get it built))......
---------------------------------------------------------------------------------------------------
and: "/dev/hdb2 or /dev/sdb2 as it's the second partition."
-----------------------------------------------------------------------------
Until I build the new machine, I only have WD & Seagate IDE hard drives.
For SATA physical hard drives: --- (same for hd?? with PATA) --- (?? for IDE ??):
sdb2 = Slave Drive, partition 2 (New Primary partition for Ubuntu /ROOT) (F:?)
sdb3 = Slave Drive, partition 3 (1st extended partition for /SWAP (G:?)
sdb4 = Slave Drive, partition 4 (2nd extended partition for /HOME (assuming separate partition)
sdb5 = Slave Drive, partition 5 (3rd extended partition for /BACKUP
sdb6 = Slave Drive, partition 6 (??? EXTENDED or PRIMARY???) for 2nd Linux Distro /ROOT??
Have I got it right? (what about 2nd distro /ROOT? - another PRIMARY partition? will fdisk allow that?)
Actually, now that I think about it, I think I'll just get a SATA drive and install it as /dev/sdc for use with Linux. (Then when I build the new machine, I can just install this disk as the primary drive (sda). Would that work?) In that case, my new SATA drive (now, in THIS machine) would be the 3rd drive (sdc?):
Could DIFFERENT installed distros utilize the SAME /HOME partition? If so, how would you direct another /root to use the already established /home partition?
What about utilizing the same /SWAP partition? (since only one distro will be running at any given time). Again, if so, how to set this up?
How much space should I allow for each partition and how much for each additional distro test install?
What is the difference between ext3 and ext4 file system designations ?
Will ALL distros run on ext4 (which I assume is the latest file system) ?
Thank you guys so much for taking the your time to inform me.
Some clarifications: Since around kernel 2.6.26 all disks use the SCSI subsystem, regardless if they are PATA or SATA, even USB devices, so all disks get a sdX name.
To your partitioning:
Quote:
sdb1 = Slave Drive, partition 1 (my windows backup partition E
sdb2 = Slave Drive, partition 2 (New Primary partition for Ubuntu /ROOT) (F:?)
sdb3 = Slave Drive, partition 3 (1st extended partition for /SWAP (G:?)
sdb4 = Slave Drive, partition 4 (2nd extended partition for /HOME (assuming separate partition)
sdb5 = Slave Drive, partition 5 (3rd extended partition for /BACKUP
sdb6 = Slave Drive, partition 6 (??? EXTENDED or PRIMARY???) for 2nd Linux Distro /ROOT??
There can only be one extended partition, which can contain several logical partitions. Unlike Windows XP Linux doesn't care at all if you install it to a primary or logical partition, so there is no need to have the /-partition (which contains the system and is something different than /root) as a primary partition. Also, please note that logical partitions always start at sdX5, even if sdX2, sdX3 or sdX4 not exist.
Quote:
Then when I build the new machine, I can just install this disk as the primary drive (sda). Would that work?
This will work if your distros use UUIDs to determine which partition is which (most modern distros do this by default), otherwise you will have to adapt bootloader and fstab settings.
Could DIFFERENT installed distros utilize the SAME /HOME partition?
I wouldn't do that, as different distributions will probably have different versions of several programs, therefore different configuration files. Installing a second distro using the same /home partition used by the the first would overwrite at least some configuration files, possibly driving you into problems. On the other hand, you could easily store all your personal data in a single, separate partition, mounting it on a directory in the /home partition of each distro, then linking to it from the user's home directories. This way the actual /home partitions can also be smaller, as they will store only configuration files and little more.
Quote:
What about utilizing the same /SWAP partition? (since only one distro will be running at any given time). Again, if so, how to set this up?
This is how it's usually done: the same swap partition is used for all systems. Swap partitions for a given system are defined in /etc/fstab. You can create a new one by using fdisk (or another partitioning tool), then initialize it issuing the makeswap command, activate it without reeboting using swapon. You can easily find information about these commands. In general, the Linux Partition Howto provides useful and interesting information on partitioning, swap, filesystems and so on.
Quote:
How much space should I allow for each partition and how much for each additional distro test install?
This is a partly subjective matter which depends on the distribution, the software you selected for installation, the software you are planning to install later, the storage needed for your own files and other possible variables.
Quote:
What is the difference between ext3 and ext4 file system designations?
Will ALL distros run on ext4 (which I assume is the latest file system)?
No, older distros won't support ext4. You can look for example at Distrowatch.com and check the table of a specific distribution, to see which releases support ext4. Look at the Journaled File Systems row.
Best regards,
Philip
Last edited by Philip Lacroix; 07-29-2013 at 05:06 PM.
Reason: clarification.
Alright, since this thread is still open I guess you haven't found out the solution to your problem yet. I explain everything step by step.
First thing first. You cannot install Linux on an NTFS partition. NTFS is a file system used by Windows used to access data on your hard disk drive.
So far I know, on Linux hard disk drives are called as /dev/sda, /dev/sdb (say you have multiple hard disks on your system) etc., and partitions are called /dev/sda1, /dev/sda1, /dev/sdb1 and so on. However, depending upon the distribution (I am using Arch Linux) of Linux 'sda' might change to 'hda' or whatever it may be - the basic concept is that they're shown in /dev/ directory.
Here '/' is your main directory (i.e., where your Linux files are located at the lowest level, like C:/ in Windows).
Now, you have two options. You can either create a new partition from blank space or format an existing one. If I were you, I would have created a new one.
To do that you must use utilities like cfdisk etc. Again depending upon the distribution you may choose different methods to create and format partitions.
If you are installing Ubuntu or a Linux distribution with GUI installer then you must probably have access to live enviorment.
The good thing is that Ubuntu allows you to change create and format partitions as a part of installation process - so you don't have to worry about anything.
However, if you are using a Live Linux Disk then you can install Gparted which will allow you to do this in GUI mode which is very easy. To install Gparted from terminal in ubuntu or any similar distro (launch terminal from Ctrl+Alt+T in most distros) enter following command:
Code:
apt-get install gparted
Then run command 'gparted' to run the tool.
However, if you want to do everything in command line. You can follow this procedure.
1. Check which disks are available using following command:
Code:
fdisk -l
Let's assume that you have only one disk 'sda' (or 'hda' perhaps).
2. Run cfdisk to create and edit partitions.
Code:
cfdisk /dev/sda
The above command will launch cfdisk for 'sda' and since cfdisk is pretty easy to use I wouldn't go in details about using it. If you still want to learn how to use cfdisk just Google it.
3. Format the partitions.
Say you have created partitions /dev/sda1 and /dev/sda1 for installing Linux on them. You can format them with following commands:
Code:
mkfs.ext4 /dev/sda1
Code:
mkfs.ext4 /dev/sda2
4. Once you have formatted you can install Linux on these drived.
Here are some other things that if I would have known for my first time had saved a lot of time for me:
- Swap space is not required unless you plan to hibernate your computer
- Do not create too many partitions. Having one for root and one for home is enough in most cases.
Last edited by chetanbhasin; 07-30-2013 at 01:12 PM.
Swap space is not required unless you plan to hibernate your computer.
It might be indeed.
Quote:
It is possible to run a Linux system without a swap space, and the system will run well if you have a large amount of memory -- but if you run out of physical memory then the system will crash, as it has nothing else it can do, so it is advisable to have a swap space, especially since disk space is relatively cheap.
I'm a little confused. How can I install and run GParted, or do anything from the command line, if Linux is not yet installed? I can see how I could use a Live GParted CD (which I ordered from OSDisk and which did not boot - now I've tried burning one myself), but not how I could install it if there is no Linux partition yet. Are you saying I can RUN GParted from an Ubuntu Live CD (without installing it) to create my partitions? Or, also, that I could just let Ubuntu do that work DURING the install?
I'm not sure where to get an Ubuntu Live CD - I tried ordering from OSDisks, but only half of the cd's I ordered from them would boot. I would rather get a cd that has applications and everything included on it, than to try to create one myself. Gparted is kind of small, so I didn't mind that. What is a good place to order distro disks that function as both a Live CDs and Install CD?
Oh, one more question. How will GParted see my WinXP partitions? Will those appear as sda1, sda2, sdb1? Will they still have their C: D: and E: designations in XP?
Anna, most modern distributions have Gparted preinstalled with their live cd's so you usually won't need to install it to your live session.
As far as getting a distribution it's a lot easier to download them than to try and order them from somewhere. Simply go to the "Distrowatch" website, browse the different distros then when you see some you like go to their home pages and download an image.
Most all will have an installation tutorial to help you understand the process of partitioning and installing their particular system.
From what I gather from your earlier posts you want to use the second 171 GB partition of your second drive for Linux and you want to create a /, home, swap, and another / for a second distro (I would also suggest adding a Fat32 partition to transfer files from Linux to your Windows system if you ever needed to). If that is correct I will give an example setup and how to create it.
First boot into a live session and start the partition editor (most have Gparted)
Second delete sdb2 (that will be the second partition of the second harddrive)
Third create your new partitions (I will give an example setup, make yours to suit your needs)
First partition (new sdb2) 2-4 GB swap
Second partition (sdb3) extended
Third partition (sdb5) / of your first Linux system - at least 20 Gb
Fourth partition (sdb6) /home of your first Linux system - I would make this 30-50 GB
Fifth partition (sdb7) back up? - not knowing what you intend to backup can't recommend a size
Sixth partition (sdb8) second Linux distro / - same as first, at least 20 GB
Seventh partition (sdb9) second Linux distro /home - 30-50 GB
Eighth partition (sdb10) storage/transfer for use by both Windows and Linux - 20 - 30 GB
I put swap on a primary partition because I've always read it gives slightly better performance that way and I've always set mine up like that.
You will need to format the swap partition as swap, the Linux partitions in the file system you choose (I like the old trusted ext3 but many prefer ext4), I have no idea what to format the backup partition, and the storage/transfer partition to Fat32.
Also all the partition sizes can be adjusted according to what your intended uses are going to be, the sizes I gave for the Linux partitions were for a system that was going to be used as a primary operating system, if they are just going to be used for testing the partition sizes can be greatly reduced to say 15 GB for / and 10-20 GB for /home.
As far as the swap partition is concerned any Linux distro you install will automatically add and use the existing swap.
And to answer your last question, the way Linux will list your windows partitions will vary, It may show a name if the partition has a label or it may show just the size in your file manager but it will not use the windows designations of C,D,F, and such.
Last edited by itsgregman; 08-02-2013 at 04:44 PM.
Re: Partitioning/Formatting for First Install of Linux
I have gone ahead and ordered a 1TB Seagate SATA III disk to install in my current PC for Linux (yikes, one this size WILL work with my old hardware (x86, 32bit, cpu=AMD Athlon 64 Single Core, 2GB RAM), won't it?). I can reuse this SATA drive in my new build. So I'm not cramped for room at all - I'll probably triple, at least, the sizes you suggested. I understand that my live/install disk (via GParted) will offer formatting and partitioning for this new drive.
I initially thought that "/"(root?) held the system files and "/home" held my data files (like "My Documents" in XP, which I have on a separate partition along with my Outlook Express email store, so these won't be touched when I do a system restore of C from an image), but now I'm not sure my assumptions are true. (I guess I should switch to Thunderbird or something, so my email files will be readable by Linux - I hope gmail will POP3-download into Thunderbird - I really hate-hate-hate using gmail's website.)
(Q1)- What files are contained in / and /home?
(Q2)- I would like my system files to be identified for imaging/cloning, so that I can completely restore my system, without touching my personal files, but is that / AND /home? ...(Q2a)- Is there an app to do that? Or is "/" merely an access designation for greater 'authority'?
(Q3)- I would like my personal files, including email, to be in a separate partition for backing up a different way (and so they will NOT be included in the system image/clone files) - how to put my data files into a separate partition?
(Q4)- In the sample partitioning you gave, what is sdb3-extended partition for? Formatted as?
(Q5)- How do I get partitions to start on ...??...borders...???...cylinders...???
(Q6)- Is the "shared" partition (WinXP-Linux) the only one that needs to be FAT32?
(Q7)- So SWAP being on the first partition, it is the ONLY PRIMARY partition among all the partitions, is that right? You can only have ONE primary partition on the drive, right? So Linux doesn't need to be on a primary partition?
(Q8)- When I asked about the drive/partition designations, I meant would Windows still see them as C:, D, and E - I kinda figured that Linux wouldn't. My XP disk manager is not working properly so I can't change (fix) the drive letters if they get messed up. I was afraid it would get further confused if I changed a partition using GParted and sdb1, but it won't matter now that I'll be using a different drive altogether.
(Q9)- The Backup Partition will have two primary directories/folders: one for maintaining an exact copy of my data files partition (so I need one directory as large as my data partition, plus a very large directory to keep compressed system image files - I like to keep images from my initial install and key images up to today (I keep a diary on the QuickLaunch to add notes when I do anything that changes the system between images, so I can restore and then quickly bring the system back up to date, minus whatever I don't want). I now use SecondCopy for data files and AcronisTrueImage for system images. Are there apps for Linux for doing this?
Finally, I cannot create/register an account on Distrowatch to download Ubuntu because the CAPTCHA word is not showing and the spoken option sound is so garbled that I can't understand the numbers. I am using Firefox 3.6.2 (for reasons) and I have javascript and cookies enabled in Firefox and relevant scripts enabled in noscript. CAPTCHA works fine on other sites, but nowhere in anything related to ubuntu (including Ubuntu One) does the CAPTCHA word appear. I don't know what to do. Any ideas?
Thanks for taking your time to give me a hand,
Annie
...when I searched to download Ubuntu 12.04.2, that one site offered downloads for Intelx86 and AMD64. I currently have an old (2006) AMD Athlon 64 CPU Single. Does this mean I HAVE 64bit? DUH! I know I have 32bit Windows XP Home installed. This old mobo only supports 2GB of memory, the CPU socket is 939. I did build this machine, it's just been seven years, and hardware has never been my forte - I guess it's time to take my head out of the sand and learn more about it.
Do I have 64bit processing?
If you have an Athlon 64 processor, then that's a 64 bit chip and you can use either the x86 or AMD64 version of Ubuntu. The 64 bit version may run slightly better, but given that your motherboard only supports 2 GB of RAM, you probably won't notice too much difference between the two options.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.