Linux

For tech wizards and n00bs alike. Questions, answers, or just general hoo-haa.

Moderator: Moderators

Message
Author
User avatar
Symphona
Apprentice
Posts: 102
Joined: Sat Jan 24, 2009 8:29 pm
Location: England

Re: Linux

#61 Post by Symphona »

Newest update is apparently I can't have more than 4 primary partitions...of the four I have, one is my windows drive, one linux, one a small 5 gig or so related to the windows and a 4th 49meg unknown format thing...

I'll give it the full do-over first, I was hoping to avoid it but oh well.

Thanks
Linux is hard...

User avatar
avwolf
Templar Inner Circle
Posts: 7006
Joined: Wed Jan 17, 2007 5:33 pm
Location: Nebraska, USA
Contact:

Re: Linux

#62 Post by avwolf »

Symphona wrote:Newest update is apparently I can't have more than 4 primary partitions...of the four I have, one is my windows drive, one linux, one a small 5 gig or so related to the windows and a 4th 49meg unknown format thing...

I'll give it the full do-over first, I was hoping to avoid it but oh well.

Thanks
That's correct. If you want to subdivide more than that, you've got to break it down into logical partitions, which don't always boot the best, IIRC. The other problem is that, in order to have logical partitions, you need to let one of your primary partitions be an "extended" partition, which contains the logical partitions. Probably not going to be a very fun partitioning scheme. :-?
Image

User avatar
aj
Consistently Inconsistent
Posts: 1725
Joined: Wed Jul 30, 2008 10:13 am

Re: Linux

#63 Post by aj »

avwolf wrote:The other problem is that, in order to have logical partitions, you need to let one of your primary partitions be an "extended" partition, which contains the logical partitions.
What I've found to be useful (kind of) when I'm creating exactly 4 partitions is to force each one of them to be a primary partition. that way I only end up with 4 partitions. Makes things somewhat simpler. :P

Though I'm not too sure how it'll work with Windows. I normally create 4 partitions - /boot, /, /var and /home. Though you could merge /boot, / and /home into a single partition I guess, that leaves you with /, /home, Windows and 1 'spare'.

Reasoning for separate partitions:
/boot - formatted in ext3 so grub can load, and so if / get hosed for some reason, I should be able to boot into single user mode to repair it, though I've never had too.
/ - used to format it in ext3, but moved to ext4.
/var - Log files and such are stored here, so I don't have to worry about log files filling up /
/home - always always always put your personal data on another partition. I do this on Windows too. C: for the install and programs, D: for documents, music and such. That way I can just blow away /, /boot and /var whenever I upgrade without worrying (too much) about my data.
avwolf wrote:"No dating dog-girls, young man, your father is terribly allergic!"
y̸̶o͏͏ų̕ sh̡o̸̵u̶̕l̴d̵̡n̵͠'̵́͠t͜͢ ̀͜͝h̶̡àv̸e͡ ̛d̷̨͡o͏̀ne ̶͠͡t҉́h̕a̧͞t̨҉́.̵̧͞.͠͞.͟

RobbieThe1st
Templar GrandMaster
Posts: 706
Joined: Fri Dec 08, 2006 7:06 am
Location: Behind my computer.
Contact:

Re: Linux

#64 Post by RobbieThe1st »

Oh, that explains a lot - With the standard partition style used by windows boxes, theres a limit of four primary partition "slots" on -any- harddisk, like avwolf says.

Secondary partitons take up one "slot", but act like a container for more partitions.

What you can do is something like this:
-----Whole Drive(150GB)-----
-Primary 1 - Windows(50GB)
-Primary 2 - 5GB odd windows partition
-Primary 3 - 49 meg partition(recovery partition?)
-Secondary partition - ~94GB partition
---Linux partition 1
---Linux partition 2
---Linux partition 3

And this will work fine, just so long as (I think)Grub is setup on one of the primary partitions, and that partition is marked with the boot flag.
Linux has no trouble booting from a logical drive inside a secondary; I've done it myself - This is my current setup:
Image
SDA1 - Windows(Primary).
SDA2 - special Boot Loader partition(which didn't work out too well)(Primary).
SDA3 - Linux(Extended);
SDA6 - Linux "/"
SDA5 - Linux Swap
SDA4 - Data storage(Primary)

----
I'll probably do something different soon, but this setup seems to work correctly. There are some fragmentation issues with using a NTFS drive from Linux though...

Colt45ws
Apprentice
Posts: 132
Joined: Fri Feb 05, 2010 1:54 am

Re: Linux

#65 Post by Colt45ws »

On my netbook I have 6 partitions and it does not even have windows. I had to write it all down while I was installing Gentoo to keep track, lol.
-Colton
Image

User avatar
Symphona
Apprentice
Posts: 102
Joined: Sat Jan 24, 2009 8:29 pm
Location: England

Re: Linux

#66 Post by Symphona »

Thanks for the help everyone, that adds another thing I understand well enough to manage on my own...

Last question, although I fear I know the answer, I can't re-partition anything without formatting it can I? I'll need to re-install windows, although having said that, might be too much effort to bother with.

Anyway, thanks muchly, I'm sure i'll be back soon crying for help... :maren:
Linux is hard...

User avatar
avwolf
Templar Inner Circle
Posts: 7006
Joined: Wed Jan 17, 2007 5:33 pm
Location: Nebraska, USA
Contact:

Re: Linux

#67 Post by avwolf »

Symphona wrote:Last question, although I fear I know the answer, I can't re-partition anything without formatting it can I?
Yes and no. In general, you can make partitions bigger without too much danger, then "grow" the file system to fill in the new space. In order to make partitions smaller, you have to "shrink" the file system, then change the partition size. With some kinds of partitions, that's easier to do than others, and it's always kind of risky (it's why the Linux LVM system was created, to make it easier and less risky to modify partitioning schemes for commonly modified partitions, like /usr, /home, /var, and /opt). If you don't shrink the file system first, it'll probably blow up on you, and shrinking file systems is the tricky part; that's why software like Partition Magic exists. And it isn't always even possible, depending on file system type.
Image

User avatar
aj
Consistently Inconsistent
Posts: 1725
Joined: Wed Jul 30, 2008 10:13 am

Re: Linux

#68 Post by aj »

avwolf wrote:it's why the Linux LVM system was created, to make it easier and less risky to modify partitioning schemes for commonly modified partitions, like /usr, /home, /var, and /opt
Ahh... LVM. Making management of partitions in general so much easier. From what I know, LVM works by abstracting the physical hardware from partitions that appear. As in it works by creating one big partition on your disk, then using software to keep track of what partition starts where on the disk, and such. Which means you can do nifty stuff like have a partition span 2 or more drives - think 20+40+80GB, not suitable for RAID 0, but LVM allows you to create a single 140GB partition by combining all 3 drives, or have sectors in a partition spread across more drives, allowing for greater theoretical maximum throughput since your partition now spans two or more physical disks, but all those special 'partitions' appear as a standard disk to Linux.

And then for the modification portion, you have commands like lvextend, and so on. The full list is under the "See also" section here: http://linux.die.net/man/8/lvm

Thing is, technically it shouldn't be called a partitioning scheme because it's really getting around the whole antiquated limit of 4 partitions, and the logical partition stuff, by creating one big partition and then using software, which isn't limited to a maximum number of partitions. Of course, for people like Robbie who switch back and forth between OSes, this doesn't work because (AFAIK) there's no Windows support in any form for LVM. For ext2/3, there's at least a driver/Installable File System thingy, but no such luck for LVM - yet.

Since LVM is filesystem-agnostic, you still have to muck around with the filesystem itself though as Av pointed out. resize2fs seems like it would be your best bet, assuming you used ext2/3. I'm not sure about ext4...
===
Also, do any hard drive partition changes with a live CD or something. Using your actual system to do this can cause it to screw up tremendously, or simply not work at all. (At which point you become very familiar with commands like vgscan, vgimport and vgexport, or, alternatively, fdisk, kpartx, and, if you're really unlucky, grub.)
avwolf wrote:"No dating dog-girls, young man, your father is terribly allergic!"
y̸̶o͏͏ų̕ sh̡o̸̵u̶̕l̴d̵̡n̵͠'̵́͠t͜͢ ̀͜͝h̶̡àv̸e͡ ̛d̷̨͡o͏̀ne ̶͠͡t҉́h̕a̧͞t̨҉́.̵̧͞.͠͞.͟

RobbieThe1st
Templar GrandMaster
Posts: 706
Joined: Fri Dec 08, 2006 7:06 am
Location: Behind my computer.
Contact:

Re: Linux

#69 Post by RobbieThe1st »

Gparted seems to be able to shrink the latest NTFS partition(tested with a W7 pro partition) with no trouble; I was actually amazed when it worked properly with no issues.

User avatar
aj
Consistently Inconsistent
Posts: 1725
Joined: Wed Jul 30, 2008 10:13 am

Re: Linux

#70 Post by aj »

RobbieThe1st wrote:Gparted seems to be able to shrink the latest NTFS partition(tested with a W7 pro partition) with no trouble; I was actually amazed when it worked properly with no issues.
Oh yes! gparted! Grab the live CD to do stuff with your partitions: http://gparted.sourceforge.net/livecd.php
avwolf wrote:"No dating dog-girls, young man, your father is terribly allergic!"
y̸̶o͏͏ų̕ sh̡o̸̵u̶̕l̴d̵̡n̵͠'̵́͠t͜͢ ̀͜͝h̶̡àv̸e͡ ̛d̷̨͡o͏̀ne ̶͠͡t҉́h̕a̧͞t̨҉́.̵̧͞.͠͞.͟

User avatar
Symphona
Apprentice
Posts: 102
Joined: Sat Jan 24, 2009 8:29 pm
Location: England

Re: Linux

#71 Post by Symphona »

Here's a question: when you say live cd, would a live USB work as well? I havent quite gotten round to getting a drive for my netbook...

Thanks for the help guys
Linux is hard...

User avatar
aj
Consistently Inconsistent
Posts: 1725
Joined: Wed Jul 30, 2008 10:13 am

Re: Linux

#72 Post by aj »

Symphona wrote:Here's a question: when you say live cd, would a live USB work as well? I havent quite gotten round to getting a drive for my netbook...

Thanks for the help guys
I don't see why it wouldn't. Might as well give unetbootin a try then: http://unetbootin.sourceforge.net/

Just FYI, my experiences with booting from USB have been mixed though - on my laptop it worked fine, on the desktop it kept on going back to the boot menu.
avwolf wrote:"No dating dog-girls, young man, your father is terribly allergic!"
y̸̶o͏͏ų̕ sh̡o̸̵u̶̕l̴d̵̡n̵͠'̵́͠t͜͢ ̀͜͝h̶̡àv̸e͡ ̛d̷̨͡o͏̀ne ̶͠͡t҉́h̕a̧͞t̨҉́.̵̧͞.͠͞.͟

User avatar
avwolf
Templar Inner Circle
Posts: 7006
Joined: Wed Jan 17, 2007 5:33 pm
Location: Nebraska, USA
Contact:

Re: Linux

#73 Post by avwolf »

Yeah, as much as I like LiLi, I had much better luck with ubetbootin. I've been using it to USB boot some new server hardware (since it doesn't have a CDROM either), and play with the RAID controller. You should be fine booting off the USB, Symphona.
Image

RobbieThe1st
Templar GrandMaster
Posts: 706
Joined: Fri Dec 08, 2006 7:06 am
Location: Behind my computer.
Contact:

Re: Linux

#74 Post by RobbieThe1st »

http://www.linuxmint.com/wiki/index.php/LiveUSB

Aren't wiki's wonderful?
(I really recommend Linux Mint - its frigging awesome, even compared to Ubuntu which its based off of)

chrisfrey93
Traveler
Posts: 10
Joined: Fri Jun 18, 2010 7:51 am
Location: Austria

#75 Post by chrisfrey93 »

If I learned anything in two years using Linux then this: If you have no idea how it works and if it works, never change anything! ... or you will regret it. Thats my painfully experience. And about Symphonas question. A clear yes.

Post Reply