LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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, 02:23 PM   #1
Higgsboson
Member
 
Registered: Dec 2014
Location: UK
Distribution: Debian 8 Cinnamon/Xfce/gnome classic Debian live usb
Posts: 508

Rep: Reputation: 49
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, 02:40 PM   #2
Head_on_a_Stick
Senior Member
 
Registered: Dec 2014
Location: London, England
Distribution: Arch & Debian
Posts: 1,183

Rep: Reputation: 283Reputation: 283Reputation: 283
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, 03:06 PM   #3
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,870

Rep: Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249
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, 03: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: 49
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, 03: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: 49
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, 03:35 PM   #6
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

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, 03:36 PM   #7
Head_on_a_Stick
Senior Member
 
Registered: Dec 2014
Location: London, England
Distribution: Arch & Debian
Posts: 1,183

Rep: Reputation: 283Reputation: 283Reputation: 283
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, 04: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: 49
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, 04:12 PM   #9
Head_on_a_Stick
Senior Member
 
Registered: Dec 2014
Location: London, England
Distribution: Arch & Debian
Posts: 1,183

Rep: Reputation: 283Reputation: 283Reputation: 283
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, 04: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: 49
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, 08: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: 49
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, 12:27 PM   #12
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

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 12:40 PM.
 
Old 01-06-2015, 12:53 PM   #13
Higgsboson
Member
 
Registered: Dec 2014
Location: UK
Distribution: Debian 8 Cinnamon/Xfce/gnome classic Debian live usb
Posts: 508

Original Poster
Rep: Reputation: 49
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, 01:16 PM   #14
Head_on_a_Stick
Senior Member
 
Registered: Dec 2014
Location: London, England
Distribution: Arch & Debian
Posts: 1,183

Rep: Reputation: 283Reputation: 283Reputation: 283
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 02:35 PM. Reason: Forgot about BIOS boot partition
 
1 members found this post helpful.
Old 01-06-2015, 01:18 PM   #15
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 01:57 AM
Four hard disk problems over four hard disks in a row. Yaro Linux - Hardware 13 04-25-2009 07:47 PM
want to run 2 Linux distros and winXP from two hard disks anoopsinha Linux - General 3 03-23-2005 10:32 PM
Two distros, two hard disks - boot scheme rabidundead Linux - Hardware 16 04-07-2004 09:52 PM
how to install two distros on one hard disks? piraxter Linux - Distributions 2 03-07-2003 08:34 PM


All times are GMT -5. The time now is 01:06 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration