Allegro.cc - Online Community

Allegro.cc Forums » Off-Topic Ordeals » Gentoo Linux - Installation CD - Partitioning SATA Hard Drive

Credits go to Arthur Kalliokoski, BAF, Don Freeman, Evert, HoHo, jhuuskon, le_y_mistar, Myrdos, ReyBrujo, Samuel Henderson, Thomas Fjellstrom, and Vanneto for helping out!
This thread is locked; no one can reply to it. rss feed Print
 1   2   3 
Gentoo Linux - Installation CD - Partitioning SATA Hard Drive
bamccaig
Member #7,536
July 2006
avatar

I had hoped to be creating a Gentoo Linux Installed From Source!! 8-) thread, but unfortunately I'm having problems early on that the installation manual doesn't seem to cover... :-/ Yves' constant trolling has inspired me to install Gentoo. :D

I've read through the x86 Gentoo Handbook (actually I haven't finished reading through the Working With Portage/Gentoo Network Configuration sections yet, but I figured I would get more out of them from a working system so I decided to install Gentoo first (besides, I'm on a DHCP enabled LAN so it's not all that difficult to get myself connected).

Anyway, I booted the gentoo kernel from the x86 Installation CD with the hdx=stroke option (which is supposed to allow Gentoo to see large hard drives even with BIOS' that don't support them (although this system is only a few years old so I'd be surprised if the BIOS doesn't support large hard drives anyway... :-/).

boot: gentoo hdx=stroke

Upon realizing that fdisk wasn't happy I booted back into Windows, decided to try again, and upon reading the actual Gentoo CD's output gathered that I actually had to specify which drive to configure... :-[

boot: gentoo sdb=stroke

Unfortunately, things still aren't going according to plan. The Gentoo Handbook uses fdisk to partition the drive, but fdisk is convinced that my SATA hard drive is only 8-10 GB...

# fdisk /dev/sdb
Command (m for help): p
(output of partition table - wrong drive size and it didn't seem to understand the
partition table Fedora had created)

In reality, the hard drive is actually rated as 250 GB. I got the impression that fdisk isn't intended for partitioning large drives and that parted is an alternative utility. Unfortunately, upon entering parted...

# parted /dev/sdb

...I get a message that my hard drive uses a sector size of 2048 (which fdisk agreed about), but that parted's support for 2048 byte sectors was HIGHLY EXPERIMENTAL...

So where should I go from here? Does anybody know why fdisk doesn't recognize the partition table, why it shows the wrong hard drive capacity, and what the correct way to accomplish this is? :-/

As I mentioned earlier, the hard drive is a SATA drive and for the record there is allegedly a RAID controller (though I don't use it - the primary drive is my Windows system and the slave drive has been my Linux system).

Assuming I can figure this out, I'm planning to put /boot and / in separate primary partitions with /home, /opt, /usr, and /var in separate partitions of an LVM. There will also be a swap partition.

/dev/sdb1    /boot                100 MB
/dev/sdb2    /                    20 GB
/dev/sdb3    LOGICALVOLUME001     180 GB
/dev/sdb4    swap                 2 GB

LOGICALVOLUME001
    /home                         100 GB
    /opt                          20 GB
    /usr                          40 GB
    /var                          20 GB

...:D???

Myrdos
Member #1,772
December 2001

Watch out for Yves.

__________________________________________________

ReyBrujo
Moderator
January 2001
avatar

Is your SATA drive empty so that you can format it? Try booting without the hdx=stroke option. As far as I know, the latest driver treats both ATA and SATA disks as if it were the same (that is why Ubuntu does not have hd* anymore, only sd*), and the default fdisk should be able to handle > 300gb disks (I have a 300gb ATA which was fdisk'ed without problem).

--
RB
光子「あたしただ…奪う側に回ろうと思っただけよ」
Mitsuko's last words, Battle Royale

le_y_mistar
Member #8,251
January 2007
avatar

Quote:

I booted back into Windows

you did the right thing

-----------------
I'm hell of an awesome guy :)

bamccaig
Member #7,536
July 2006
avatar

ReyBrujo said:

Is your SATA drive empty so that you can format it?

Originally, no. It had a Fedora installation on it. While troubleshooting I deleted the partition table using fdisk so as far as the partition table and fdisk are concerned the drive should be empty.

ReyBrujo said:

Try booting without the hdx=stroke option.

The first time I booted the installation CD I forgot about the hdx=stroke option and just booted the default gentoo kernel without options. That's when I first noticed fdisk's inaccuracies. Tomorrow I will try again, however. :-/

Does anybody know if the format of the kernel option is correct? Should it be hdx=stroke, hdb=stroke, or sdb=stroke? :-/

le_y_mistar said:

you did the right thing

::) Thanks. Don't you use Gentoo? :-/ I was kinda expecting you to have the answers (among others)... :)

ReyBrujo
Moderator
January 2001
avatar

Yves is an analyst. He gives opinions of things he has never tried ;)

Quote:

While playing around, I deleted the partition table using fdisk, however, so as far as the partition table and fdisk is concerned the drive should be empty.

cfdisk is the user friendly version of fdisk. My opinion is that fdisk is trying to read the partition table instead of loading it "empty" (since you have already deleted it). Supposedly, if you have deleted the partition the disk can be formatted. If the disk has Windows in it, just try to build a partition and format it to FAT32 from Windows, to see if Gentoo can recognize it.

By the way, which version fdisk and parted are, and what they are reporting?

(Edited: If Windows can see the full disk, you don't need to supply the stroke parameter. And I think it is only for IDE disks. Theoretically, you should use sdb=stroke (or sda if it is your primary disk), but it may not work. Try checking dmesg after booting to see if the option was rejected by the boot loader.)

--
RB
光子「あたしただ…奪う側に回ろうと思っただけよ」
Mitsuko's last words, Battle Royale

Neil Black
Member #7,867
October 2006
avatar

Quote:

you did the right thing

That is never the right thing.

bamccaig
Member #7,536
July 2006
avatar

ReyBrujo said:

cfdisk is the user friendly version of fdisk. My opinion is that fdisk is trying to read the partition table instead of loading it "empty" (since you have already deleted it). Supposedly, if you have deleted the partition the disk can be formatted. If the disk has Windows in it, just try to build a partition and format it to FAT32 from Windows, to see if Gentoo can recognize it.

I probably should have mentioned that after deleting the partition table fdisk accepts that the partition table is empty (on the slave drive - /dev/sdb). However, it still thinks the drive is only 8-10 GB. :-/ Sadly, I have to work in the morning so any more troubleshooting will have to wait until tomorrow... :-/

ReyBrujo said:

By the way, which version fdisk and parted are, and what they are reporting?

I'm not sure (though I will check tomorrow). :-/ Whatever version is on the Gentoo x86 Installation CD. :)

ReyBrujo
Moderator
January 2001
avatar

If Windows can see the full disk, you don't need to supply the stroke parameter. And I think it is only for IDE disks. Theoretically, you should use sdb=stroke (or sda if it is your primary disk), but it may not work. Try checking dmesg after booting to see if the option was rejected by the boot loader.

If stroke did work with sdb, then I stand corrected.

--
RB
光子「あたしただ…奪う側に回ろうと思っただけよ」
Mitsuko's last words, Battle Royale

jhuuskon
Member #302
April 2000
avatar

Quote:

That is never the right thing.

For most of the time, systems and users, it is the right thing.

You don't deserve my sig.

HoHo
Member #4,534
April 2004
avatar

Some comments on your partitioning plans:

/boot 100MB: OK but you can do with much less. My 100M partition has around 20 different kernels on it because I haven't bothered to clean it up during the last 3 years or so

/ 20GB: That's quite a bit. My entire / without /home and /usr/portage takes 8GB with a whole lot of stuff installed. Of course I don't have lots of latest games installed.
swap 2GB: I'd put swap right after /boot as drive is faster at the beginning. Also 2GB seems like an awful overkill if you have 1GB+ of RAM. I'd go with 0.5-1GB max.

/home 100 GB: Ok, but I like to have my data on somewhere else by home directory. Something like /mmt/data
/opt 20GB: you could probably get by with much less. Even 5GB would be overkill
/usr 40GB: it'll be hard to fill even half of that.
/var 20GB: unless you have huge databases and web pages stored on your PC you can get by with much less. Though compiling OOo will take around 6GB of free space in that dir (/var/tmp to be exact)

I'd go with something like that:
/boot 30M
swap 1G
logical volume of the rest of the disk
/ 15G just in case
smallstuff: contains /tmp, /usr/portage, /var/tmp and /var/db (portage cache) with symlinks or bind-mounted to their correct places. Those dirs contain lots of tiny files that are often changing. Separating them from the rest of the system will help avoid disk fragmenting. Around 10-15GB should be enough for pretty much everything and you won't have to clean downloaded portage files too often.
/var depending on how bit DB's you have but a couple of gigs should be enough
/home 10G is enough for holding smalls stuff
With the resti I'd create a data partition to hold all sorts of big stuff like music, home videos and others.

Another thing you might want to do is to create a partition of few gigs in size as a backup OS in case you screw up your original install. For basic KDE/Gnome install 2-3GB is enough and you don't need to have it in pieces as the main install. Just enough to be able to boot into a GUI environment in order to fix things when they get broken.

__________
In theory, there is no difference between theory and practice. But, in practice, there is - Jan L.A. van de Snepscheut
MMORPG's...Many Men Online Role Playing Girls - Radagar
"Is Java REALLY slower? Does STL really bloat your exes? Find out with your friendly host, HoHo, and his benchmarking machine!" - Jakub Wasilewski

Samuel Henderson
Member #3,757
August 2003
avatar

Hehe. I was kinda looking forward to what Yves's response to this thread was :D

I'd like to try Gentoo someday, but I find myself running out of computers to put various linuxes on. :'(

=================================================
Paul whoknows: Why is this thread still open?
Onewing: Because it is a pthread: a thread for me to pee on.

bamccaig
Member #7,536
July 2006
avatar

Unfortunately, my iPod was corrupted (allegedly from the BIOS attempting to boot from it) so I have to restore it to factory defaults and resync it with my library (I'll take Microsoft over Apple any day)... That's gonna take most of the night to do so this will probably have to wait until tomorrow. :-/

@ReyBrujo: I will try after. :-/ I appreciate the help. :)

@HoHo: Thanks for the advice. I will come back to this if I ever manage to partition my hard drive. :P Mostly though, I'm not too worried about the dimensions of my LVM2 partitions because in theory they are resizeable. We'll see whether or not I can even get LVM2 working when the time comes.

le_y_mistar
Member #8,251
January 2007
avatar

bamccaig, to be honest, although your threads were kinda silly at times, i had some respect for you as you did show to have a higher testosterone level than most of these numb nuts, but now that you're installing gentoo.....god....i just hope you don't start compiling gentoo over irc and camping outside stores for 20+ hours:-/

-----------------
I'm hell of an awesome guy :)

bamccaig
Member #7,536
July 2006
avatar

le_y_mistar said:

bamccaig, to be honest, although your threads were kinda silly at times, i had some respect for you as you did show to have a higher testosterone level than most of these numb nuts, but now that you're installing gentoo.....god....i just hope you don't start compiling gentoo over irc and camping outside stores for 20+ hours:-/

;D

Samuel Henderson
Member #3,757
August 2003
avatar

So bamccaig, how many times has your iPod been corrupted? It's at least twice by my count. ;)

I feel your pain somewhat. My mp3 player got corrupted when I tried to use it from Linux. (I've since managed to use it in linux with no problems)

=================================================
Paul whoknows: Why is this thread still open?
Onewing: Because it is a pthread: a thread for me to pee on.

Don Freeman
Member #5,110
October 2004
avatar

When you get booted up, post your:

lspci -v

I had weird problems with my SATA drive under Linux when I first got it. My BIOS and motherboard suck for the SATA controller. I had to set the SATA controller to RAID for it to recognize the second drive. I have two SATA drives, one for windows and my large one for Linux. The large drive is 500GB and I never had to run any hda=stroke or sda=stroke for fdisk to see my drive correctly. I think this has something to do with the kernel using the wrong module for your SATA controller. Also, please post:

lsmod

I will try to help you get the correct module loaded for your SATA drive.::) It has been hit or miss for me with the different distros on this computer. Fedora Core 5 did not work at all...the kernel simply panicked at boot! Fedora Core 6 and later worked fine. I also noticed that on this computer, I have to exit KDE to run OpenGL programs without stutter. I have to run X without KDE. I have made a few scripts to run the programs I am wanting to, but it is annoying that this does not work correctly. This motherboard does not really follow the standards too well.>:( Also, I do not recall if you mentioned it or not, but is the windows drive a SATA drive as well? Also, please post the EXACT message that fdisk gives you, such as:

The number of cylinders for this disk is set to 60801.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

I will be working for most of the day tomorrow, but I will check this later. Feel free to PM me, as I have installed Gentoo several times on this computer and my lappy:P

[Off Topic]
I know with windows vista, you have to download an update so that windows does not corrupt the iPOD if you use the remove hardware option. I don't know if this applies to other versions of windows.
What versions of Linux have people tried their iPODs with here? And to what luck/success?

--
"Everyone tells me I should forget about you, you don’t deserve me. They’re right, you don’t deserve me, but I deserve you."
"It’s so simple to be wise. Just think of something stupid to say and then don’t say it."

Evert
Member #794
November 2000
avatar

I have a 250GB SATA drive as well, for me everything worked out of the box (in Linux that is, Windows XP doesn't even see the SATA drives, which is fine by me). Not sure how that's going to be helpful though.

Quote:

I have installed Gentoo several times

Yikes! I'm quite happy with the stability and upgradability of my system, though compile times annoy me somewhat. I've also had package upgrades break other packages a few times too often (over summer) but overall the annoyances are not worth reinstalling a whole new system. However, if I had to install a new Linux system, I would probably not install Gentoo.

Quote:

What versions of Linux have people tried their iPODs with here? And to what luck/success?

I don't own an iPod, but my mother does. She uses it with SuSe Linux 9.3 and gtkpod without any problems.

BAF
Member #2,981
December 2002
avatar

Quote:

camping outside stores for 20+ hours

It was only 14 hours, and considering I got a 22" widescreen LCD, a 17" widescreen LCD (gift), cheap desktop computer (maybe I'll put gentoo on it. :P), laptop (gift), a couple external 500GB hard drives, two free printers for $700 (after earning $100 by getting someone for someone else), I'd say I didn't make out too bad. ::)

Vanneto
Member #8,643
May 2007

ALL that for $700? Wow! :o

In capitalist America bank robs you.

bamccaig
Member #7,536
July 2006
avatar

Awesome. :D When I get home I will reply to your questions.

Out of curiosity, what do you guys think of buying an Everex gPC for $200-300 and installing a real Linux distribution on it (if Gentoo goes well I was thinking Gentoo) and using it as a GUI-less dedicated server (mostly for myself)? :-/ I'd like to develop a personal Web site and register a domain name, etc.

Don Freeman
Member #5,110
October 2004
avatar

I've tried several versions of Linux, but I always seem to go back to Gentoo. You can just customize so much stuff with Gentoo. Post those items and I will try to help you when I get home.;D

--
"Everyone tells me I should forget about you, you don’t deserve me. They’re right, you don’t deserve me, but I deserve you."
"It’s so simple to be wise. Just think of something stupid to say and then don’t say it."

Thomas Fjellstrom
Member #476
June 2000
avatar

It'll take the everex a looong time to compile stuff, but if its cpu is "quirky" enough (like the Via C3-II aka Nemiah) it can make a huge difference if the right opts are used. Otherwise, save the time and go with an i686 distro.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Don Freeman
Member #5,110
October 2004
avatar

The only thing that really took a long time to compile on my machine was open office...I didn't think that package would EVER get done! But the nice thing about Gentoo is you can opt to use binary packages as well, and all the tools that are needed to compile most packages are already on your system. You can tell emerge to make bin packages so it is easier, and faster, to clone your Gentoo system onto another box.;)

If you really get into Gentoo, I would recommend using paludis. It takes some getting used to, but it is much faster than portage. It can also separate the config files out to make it easier on you. Check out the features section on it.8-)

--
"Everyone tells me I should forget about you, you don’t deserve me. They’re right, you don’t deserve me, but I deserve you."
"It’s so simple to be wise. Just think of something stupid to say and then don’t say it."

bamccaig
Member #7,536
July 2006
avatar

I just tried fdisk again and it is now able to see all 250.0 GB of the drive!!! The only major differences between now and the other day is that the partition table was empty on boot, and I booted with the dolvm2 kernel option (although since the partition table is empty this shouldn't have really mattered this time - though it might have last time).

boot: gentoo sdb=stroke dolvm2

Anyway... Yayz! :D On with the installation...

Thanks everybody for the assistance. Hopefully my next Gentoo thread is more positive. For now I'm going to hold off with the cookies until I've gotten the partition table successfully created. :P

 1   2   3 


Go to: