LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 01-03-2015, 01:23 PM   #1
Higgsboson
Member
 
Registered: Dec 2014
Location: UK
Distribution: Debian 8 Cinnamon/Xfce/gnome classic Debian live usb
Posts: 508

Rep: Reputation: 50
Preparing a hard disk for linux distros only (dualboot from 2 hard disks)


Hello everyone.
After reading dualboot threads I find that dualboot issues seem to be unique to each user. However, I want a simple setup which others may want.

I have Windows 7 on a SATA hdd and my old IDE drive was part of it's filesystem. I physically removed the IDE drive and Windows refused to work. I then did a Windows repair from the installation disk and now the Windows OS boots only from the SATA hdd. It doesn't detect the IDE drive because it's not connected.

I then connected the old IDE drive back in and BIOS detects it without problems. I don't want to boot into Windows as I think it will make the IDE drive part of its filesystem again (the IDE drive is in NTFS filesystem).
So I want to prepare the IDE drive for linux distros in ext4 filesystem format.

Firstly, I would like to know if Windows 7 will freak out if it detects a hdd in ext4 format. This is because I don't think it can write files to the drive.

Secondly, I want to prepare the old IDE hdd for linux distros. It's 160gb and I want 4 distros in 40gb partitions each. So that means 3 primary partitions with 1 extended partition which houses 1 logical partition. I believe that's correct.

I don't want complicated swap files or swap partitions. A linux distro in a 40gb partition with the modest 2gb RAM I have should be enough for a normal user like me.

So can someone please say if Windows 7 on the seperate sata hdd will freak out if it sees an IDE drive in ext4 filesystem format?
Also, can I go ahead and use gparted or something and prepare a nice living space for linux distros on my old IDE hdd?

Thank you very much for your time.
 
Old 01-03-2015, 01:40 PM   #2
Head_on_a_Stick
Senior Member
 
Registered: Dec 2014
Location: London, England
Distribution: Debian stable (and OpenBSD-current)
Posts: 1,187

Rep: Reputation: 285Reputation: 285Reputation: 285
Windows cannot read ext4 and will tell you the disk needs to be formatted, but you should be able to tell it not to.

Have you tried removing the drive letter to which it was assigned from Windows Explorer?

If you use gparted to clear the current partition table and create some new ones, I don't think Windows will even recognise it as the old drive (I could be wrong though).
 
Old 01-03-2015, 02:06 PM   #3
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,502

Rep: Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489
Many Linux distributions have GParted (Partition manager) on the installation medium. Use that to format the IDE drive. You need to verify that you have the right drive based on size or some other obvious difference since both drives are ntfs. You can create a new partition table with GParted or delete partitions and then format them or just format the partitions with ext4 or whichever filesystem you want.
 
Old 01-03-2015, 02:19 PM   #4
Higgsboson
Member
 
Registered: Dec 2014
Location: UK
Distribution: Debian 8 Cinnamon/Xfce/gnome classic Debian live usb
Posts: 508

Original Poster
Rep: Reputation: 50
Quote:
Originally Posted by Head_on_a_Stick View Post
Have you tried removing the drive letter to which it was assigned from Windows Explorer?
I haven't gone into Windows yet. Not while the hdd is still in NTFS format.

Quote:
If you use gparted to clear the current partition table and create some new ones, I don't think Windows will even recognise it as the old drive (I could be wrong though).
Yes, that's what I was thinking too. I'll need to reformat the hdd into ext4 format so linux distros can work easily.
I could simply use the fdisk command as well as gparted - I'm not familiar with gparted.
However, I'm wondering if I should reformat the whole drive first into ext4 format?
 
Old 01-03-2015, 02:25 PM   #5
Higgsboson
Member
 
Registered: Dec 2014
Location: UK
Distribution: Debian 8 Cinnamon/Xfce/gnome classic Debian live usb
Posts: 508

Original Poster
Rep: Reputation: 50
Quote:
Originally Posted by yancek View Post
Many Linux distributions have GParted (Partition manager) on the installation medium. Use that to format the IDE drive. You need to verify that you have the right drive based on size or some other obvious difference since both drives are ntfs. You can create a new partition table with GParted or delete partitions and then format them or just format the partitions with ext4 or whichever filesystem you want.
Ok, I'll use gparted.

However, what about the idea of splitting a 160gb IDE drive into four 40gb partitions for 4 distros? Is that gonna be ok?
 
Old 01-03-2015, 02:35 PM   #6
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
If you're uncomfortable working with all of your disks accessible, you can either disable the sata drive in bios or disconnect it. Me myself I don't worry about it as debian gives me the option to install bootloader on any drive. If I'm installing to sdb & also put grub there the only thing that might change on sda is the boot flag, which I can easily change with gparted.
If you're installing linux to the ide drive you can just select that drive & repartition it during installation.
 
Old 01-03-2015, 02:36 PM   #7
Head_on_a_Stick
Senior Member
 
Registered: Dec 2014
Location: London, England
Distribution: Debian stable (and OpenBSD-current)
Posts: 1,187

Rep: Reputation: 285Reputation: 285Reputation: 285
Quote:
Originally Posted by Higgsboson View Post
However, what about the idea of splitting a 160gb IDE drive into four 40gb partitions for 4 distros? Is that gonna be ok?
Sounds good to me -- I prepared a GNU/Linux "sampler" drive for my Dad which was the same size; I think it ended up with 5 different distributions each with ~30GiB.

The Debian system I am posting this from has a full GNOME desktop with LibreOffice & lots of other stuff and the 12GiB partition is only 2/3 full...
 
Old 01-03-2015, 03:02 PM   #8
Higgsboson
Member
 
Registered: Dec 2014
Location: UK
Distribution: Debian 8 Cinnamon/Xfce/gnome classic Debian live usb
Posts: 508

Original Poster
Rep: Reputation: 50
Quote:
Originally Posted by EDDY1 View Post
If you're uncomfortable working with all of your disks accessible, you can either disable the sata drive in bios or disconnect it. Me myself I don't worry about it as debian gives me the option to install bootloader on any drive.
Yes. That's the setup I'm hoping to achieve once I've got a proper distro on a hdd. I only have live debian USB at the moment.

Quote:
If you're installing linux to the ide drive you can just select that drive & repartition it during installation.
That's a good point. The thing with linux is that there are so many ways of doing the same thing. I'm going to stick with partitioning the hdd with gparted first, and then installing a distro.
 
Old 01-03-2015, 03:12 PM   #9
Head_on_a_Stick
Senior Member
 
Registered: Dec 2014
Location: London, England
Distribution: Debian stable (and OpenBSD-current)
Posts: 1,187

Rep: Reputation: 285Reputation: 285Reputation: 285
FWIW I have noticed that the Debian installer can bug-out and freeze up if you try to use the partitioner provided with the installer so I think that partitioning beforehand is probably a good idea.
 
Old 01-03-2015, 03:18 PM   #10
Higgsboson
Member
 
Registered: Dec 2014
Location: UK
Distribution: Debian 8 Cinnamon/Xfce/gnome classic Debian live usb
Posts: 508

Original Poster
Rep: Reputation: 50
Quote:
Originally Posted by Head_on_a_Stick View Post
Sounds good to me -- I prepared a GNU/Linux "sampler" drive for my Dad which was the same size; I think it ended up with 5 different distributions each with ~30GiB.

The Debian system I am posting this from has a full GNOME desktop with LibreOffice & lots of other stuff and the 12GiB partition is only 2/3 full...
Ha! That's the great thing about Debian - there's no extra pgms taking up space and memory. When I'm on Windows - antivirus, Windows update, and unknown stuff are always whirring away constantly!

I'm going to look up some stuff on gparted and prepare this hdd.
I have some dvd-rw coming soon so I can install some distros. However, I may have a go at debootsrap before then! Will keep you posted.
 
Old 01-06-2015, 07:36 AM   #11
Higgsboson
Member
 
Registered: Dec 2014
Location: UK
Distribution: Debian 8 Cinnamon/Xfce/gnome classic Debian live usb
Posts: 508

Original Poster
Rep: Reputation: 50
I have used gparted to create partitions on my hdd to be used exclusively for linux distros.
The output for the partitions is as follows:

Code:
root@debian:/# fdisk -l /dev/sda
Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x9b3c9b3c

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048    81922047    40960000   83  Linux
/dev/sda2        81922048   163842047    40960000   83  Linux
/dev/sda3       163842048   245762047    40960000   83  Linux
/dev/sda4       245762048   312580095    33409024    5  Extended
/dev/sda5       245764096   307204095    30720000   83  Linux
So I have 3 primary partitions at about 40gb, an extended partition (sda4) housing a logical partition (sda5) which is about 30gb.

However, when I look for details on each partition, I get an error message:

Code:
root@debian:/# fdisk -l /dev/sda1
Disk /dev/sda1: 41.9 GB, 41943040000 bytes
255 heads, 63 sectors/track, 5099 cylinders, total 81920000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/sda1 doesn't contain a valid partition table
The error message is the same for all the other partitions.
Can someone please advise what's gone wrong with these partitions?
 
Old 01-06-2015, 11:27 AM   #12
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
fdisk doesn't work for 1 partition. Qlthough it does tell you the size of the partition. As far as "nvalid partition table" that's because you aren't scanning MBR.

Last edited by EDDY1; 01-06-2015 at 11:40 AM.
 
Old 01-06-2015, 11:53 AM   #13
Higgsboson
Member
 
Registered: Dec 2014
Location: UK
Distribution: Debian 8 Cinnamon/Xfce/gnome classic Debian live usb
Posts: 508

Original Poster
Rep: Reputation: 50
Quote:
Originally Posted by EDDY1 View Post
fdisk doesn't work for 1 partition. Qlthough it does tell you the size of the partition. As far as "nvalid partition table" that's because you aren't scanning MBR.
I see. Thanks dude.

Incidentally, why does the first partition sda1 start with 2048?
I've seen some tutorials where the first partition starts at 1.
 
Old 01-06-2015, 12:16 PM   #14
Head_on_a_Stick
Senior Member
 
Registered: Dec 2014
Location: London, England
Distribution: Debian stable (and OpenBSD-current)
Posts: 1,187

Rep: Reputation: 285Reputation: 285Reputation: 285
Quote:
Originally Posted by Higgsboson View Post
why does the first partition sda1 start with 2048?
I've seen some tutorials where the first partition starts at 1.
This is to allow correct alignment of the partitions which maximises drive performance.
http://www.thomas-krenn.com/en/wiki/Partition_Alignment

If you haven't done anything with the disk yet it may be worth converting it to a GPT type disk -- you won't have to use extended partitions (it allows 128 partitions as standard) and a backup copy of the partition table is stored at the end of the disk in case the main table is damaged. It will also make it easier to convert to EFI-mode booting at a later date (EFI-mode booting with MBR disks is firmware-dependent and may not work at all).

You can use gdisk to convert the partition table; just run `sudo gdisk /dev/sda` and it will offer to convert it.

EDIT: For use with non-EFI system you will also need to create a BIOS boot partition -- use gdisk again and create a new partition ("n") in sectors 34-2047 (this will be the default if the disk is full) and make it type "EF02" (no filesystem required).

Last edited by Head_on_a_Stick; 01-07-2015 at 01:35 PM. Reason: Forgot about BIOS boot partition
 
1 members found this post helpful.
Old 01-06-2015, 12:18 PM   #15
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
The first 512 is usally MBR, but modified to 2048 to point to grub. Also 2048 allows for better partition allignment
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
10 year old IDE hard disk preparing to die ... my options are ...? DJ Shaji Linux - Hardware 4 06-30-2011 12:57 AM
Four hard disk problems over four hard disks in a row. Yaro Linux - Hardware 13 04-25-2009 06:47 PM
want to run 2 Linux distros and winXP from two hard disks anoopsinha Linux - General 3 03-23-2005 09:32 PM
Two distros, two hard disks - boot scheme rabidundead Linux - Hardware 16 04-07-2004 08:52 PM
how to install two distros on one hard disks? piraxter Linux - Distributions 2 03-07-2003 07:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration