LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Soon to be Linux user with slightly advanced questions (https://www.linuxquestions.org/questions/linux-newbie-8/soon-to-be-linux-user-with-slightly-advanced-questions-739280/)

pmacdonald 07-10-2009 06:20 PM

Soon to be Linux user with slightly advanced questions
 
Hello,

I'm new to Linux but am very seasoned in computers. I will be putting Linux on a new laptop which I will be taking to college. I leave for college in 2 1/2 months and will be majoring in Computer Science and Engineering. I have some questions about Linux and I'll try to make this as easy to read as possible:
  • When I purchase my laptop it will most likely have either Vista Business or Vista Home Premium on it. I plan to put Vista Ultimate on it because I purchased it when building my custom gaming rig in January. Should I download Vista Ultimate and erase the copy of the other Vista or should I keep both and then install Linux as well?
  • I read a few posts on how to install multiple operating systems on a computer and am pretty confused. I'm not great at partitioning hard drives. I was wondering if you had a guide (assuming the person was new to partitioning a hard drive) showing me how to install the separate operating systems?
  • I'm the type of person that likes to tinker with things. So when installing Linux on the laptop I'd like it if I could easily install other Linux distributions without too much hassle (I read a post where I'd have to set it to Logical instead of Primary...or something along those lines; but I'm not quite sure how to do that). This way I can try different Linux distributions and figure out which one 'catches my eye'. And I also find doing tasks like this fun.


Laptop Contenders: (any recommendations? - under $800)
Lenovo T500
Dell Latitude E6500
Compal KHLB2 (Sager NP2098)

Computer Experience:
programming html
programming php (to an extent)
programming c (to an extent...just recently started)
website management
building computers
etc... (not sure how relevant this is but I'm just pointing out that I'm not a stranger to computers)

pljvaldez 07-10-2009 06:37 PM

I've never used Vista, so I can't claim to know what is best to do with it. If you want to keep it, I'd just create a second partition for it. So I guess, assuming you'd like to keep both and install two linux distros, I would do something like the following:

1) Defrag the existing Vista install and then use the existing Vista tool to shrink the drive to whatever size you want (probably minimum 30GB). Reboot and make sure everything still works.

2) Boot up GParted LiveCD and create new partitions so that your disk looks something like this:
Code:

/dev/sda1 ~30GB NTFS - Existing Vista Home
/dev/sda2 ~30GB NTFS Vista Ultimate
/dev/sda3 200MB ext3 /boot -- will be used to store a boot directory for linux
/dev/sda4 Rest of drive logical partition -- this is a "container" that will hold all your other partitions
/dev/sda5 ~20GB ext3 / of 1st linux distro
/dev/sda6 ~20GB ext3 / or 2nd linux distro
/dev/sda7 rest of drive NTFS or FAT32 for sharing files between all your installs

3) Install Vista Ultimate in the second partition and let it find the first Vista or not. Reboot into each and make sure everything works.

4) Install your first linux distro, specify /boot partition as 3rd partition and root partition as first of the ext3 partitions. Put bootloader in the Master Boot Record.

5) Install 2nd linux distro, just specify / as being the second root partition (/dev/sda6) and then put bootloader into the root partition (/ not MBR).

6) Boot into your first linux distro, modify the boot menu to have an entry for each windows install and each linux install. In grub they should all be using the chainloader feature.

The only problem with doing this is that you need to leave enough disk space for future expansion of the OS. Linux is pretty lean and you can store all your shared files (mp3s, movies, documents, etc) in the shared partition. But if you install a bunch of windows games or programs, you'll start running out of disk space pretty quickly on those partitions and it won't be easy to grow after you've installed all this stuff.

cmdln 07-10-2009 09:20 PM

I love my lenovo thinkpad t61p. Deffinatly the best laptop I've had quality wise and I've spent more in the past.

linus72 07-10-2009 09:24 PM

If not already mentioned; Install Ubuntu last(if you install Ubuntu/Kubuntu/Xubuntu), as Ubuntu
will "automagically" setup grub and recognize other operating systems, including Windows.(98% of time)

Most other distro's will not/cannot do this.

As pljvaldez said above, defrag any windows stuff before messing around, and make backups of anything you wanna keep.

pmacdonald 07-10-2009 11:31 PM

Thanks for the quick replies.

I'm just going to overwrite the original vista that comes with it (because the ultimate should do everything +).

List of things to do in order:
Back-up anything personal (just in case but since the computer will be brand new I shouldn't need to do this)
Install Vista Ultimate 64-bit (Will I need to de-fra after the install?)
Partition the HDD
Install Ubuntu

I have a few questions about the /dev/sda4:
  • What size should it be?
  • Will this contain all the Linux distros I download?...and will I just have to move the boot loader from the distro of my choice to /dev/sda3?

In each of these partitions will they just hold each of the OS's? Or will they hold specific programs just for that OS...or will all the programs be in /dev/sda7 and will I have to move any programs from the fresh Vista Ultimate install into this partition?


Thanks again for the all the help so far,

-Peter

jmite 07-11-2009 12:55 AM

Also, if you have 4GB or more of RAM, you might want to consider running only linux on your harddrive, and running Vista Ultimate inside a virtual machine such as virtualbox, KVM, qemu or Vmware. Check to see if your laptops processor is VT-x enabled, if so, you will be able to run a virtual machine at near-native speeeds.

jmite 07-11-2009 12:58 AM

Also, if you're partitioning your HD already to put on linux, there's really no point to keeping the lower versions of vista, there's nothing they can do that Ultimate can't do, it would just be wasted space.

jschiwal 07-11-2009 01:21 AM

I bought a laptop that had Vista on it. I think it might be a good idea to use Vista's own partitioning tool to resize the partition. Defrag'ing first may allow you to free up more space on the hard drive. Defrag'ing will move files from the end of the Vista partition, toward the middle. Otherwise Vista can be a bit greedy in the space it wants.

I forgot to do defrag the Vista partition myself, and used gparted to resize partitions after installing SuSE Linux in the freed up space. I had to repair both the Vista and Linux partitions. Defrag'ing first may have avoided the problem.

Wim Sturkenboom 07-11-2009 01:33 AM

Quote:

Originally Posted by linus72 (Post 3603916)
If not already mentioned; Install Ubuntu last(if you install Ubuntu/Kubuntu/Xubuntu), as Ubuntu
will "automagically" setup grub and recognize other operating systems, including Windows.(98% of time)

Most other distro's will not/cannot do this.

As pljvaldez said above, defrag any windows stuff before messing around, and make backups of anything you wanna keep.

Where do you get that from?

I have installed for dual boot:
RH7.x with Win98SE
RH8 with Win2000
Slackware 10.0, 10.1, and 10.2 with WinXP
Ubuntu with WinXP

All above Distro's automatically picked up the already installed Windows.

Wim Sturkenboom 07-11-2009 02:09 AM

Quote:

Originally Posted by pmacdonald (Post 3603828)
When I purchase my laptop it will most likely have either Vista Business or Vista Home Premium on it. I plan to put Vista Ultimate on it because I purchased it when building my custom gaming rig in January. Should I download Vista Ultimate and erase the copy of the other Vista or should I keep both and then install Linux as well?

I did not know that you could download Vista. I thought that you had to buy it. Although I don't use Vista and have not read its EULA, I'm sure that the EULA will say that you can only have it installed on one machine at a time. And if its an OEM license, it belongs to the PC that you bought it with and installing on other systems is illegal.

Quote:

Originally Posted by pmacdonald (Post 3603828)
I read a few posts on how to install multiple operating systems on a computer and am pretty confused. I'm not great at partitioning hard drives. I was wondering if you had a guide (assuming the person was new to partitioning a hard drive) showing me how to install the separate operating systems?

You will learn. Be aware that there might be a recovery partition that can be needed when you have to re-install the Windows that came with your system. Your system can only have 4 primary partitions. So if you need to setup more partitions, you have to create a maximum of 3 primary partitions. An extended partition will automatically be created when you create the first logical partition.

Quote:

Originally Posted by pmacdonald (Post 3603828)
I'm the type of person that likes to tinker with things. So when installing Linux on the laptop I'd like it if I could easily install other Linux distributions without too much hassle (I read a post where I'd have to set it to Logical instead of Primary...or something along those lines; but I'm not quite sure how to do that). This way I can try different Linux distributions and figure out which one 'catches my eye'. And I also find doing tasks like this fun.

I'm not sure about multiple Windows on a system (never done that). My setup for a multi-boot would be something like below. You can remove what is not needed or add on.
Code:

/dev/hda1  Windows OS
/dev/hda2  Windows my documents
/dev/hda3  Second Windows OS
/dev/hda4  Extended
/dev/hda5  Linux swap
/dev/hda7  Linux / (root) for first Linux (this is where the OS goes)
/dev/hda8  Linux /home for first Linux
/dev/hda9  Linux / (root) for second Linux
/dev/hda10 Linux /home for second Linux
/dev/hda11 Linux /whatever for sharing data between the different Linux versions

Your disk will either be /dev/hda as shown above or /dev/sda

The sizes of the partitions depends on the size of your HD and what your primary OS will be. With Windows as the primary OS:
For each Windows OS, I suggest at least 20GB as you still want to install some stuff as well. As you can see, I have allocated a dedicated partition for 'my documents' so there your documents will always be safe in case of a windows re-install. A full Linux OS install takes roughly between 3GB and 5GB. So making those partitions around 10GB should be enough.

Note:
If you're system comes with a recovery disk, it might well remove ALL partitions and setup its own ones.

pmacdonald 07-12-2009 12:56 AM

"I did not know that you could download Vista. I thought that you had to buy it."

I think you should re-read my post again...I clearly stated that I had bought it. So since I already have the CD I would have to download it... I only have the OEM version so you're right on that. I'll just stick with the OS that comes with the computer and install Linux also.

I should set up 3 primary partitions but then what are these considered:
Code:

/dev/hda1  Windows OS
/dev/hda2  Windows my documents
/dev/hda3  Second Windows OS
/dev/hda4  Extended
/dev/hda5  Linux swap
/dev/hda7  Linux / (root) for first Linux (this is where the OS goes)
/dev/hda8  Linux /home for first Linux
/dev/hda9  Linux / (root) for second Linux
/dev/hda10 Linux /home for second Linux
/dev/hda11 Linux /whatever for sharing data between the different Linux versions

So it looks like I'll have a version of Vista and Linux on the laptop. I'd like to be able to easily install different versions of Linux though. What would the setup look like for that?

Quote:

Originally Posted by Wim Sturkenboom (Post 3604026)
I did not know that you could download Vista. I thought that you had to buy it. Although I don't use Vista and have not read its EULA, I'm sure that the EULA will say that you can only have it installed on one machine at a time. And if its an OEM license, it belongs to the PC that you bought it with and installing on other systems is illegal.


You will learn. Be aware that there might be a recovery partition that can be needed when you have to re-install the Windows that came with your system. Your system can only have 4 primary partitions. So if you need to setup more partitions, you have to create a maximum of 3 primary partitions. An extended partition will automatically be created when you create the first logical partition.


I'm not sure about multiple Windows on a system (never done that). My setup for a multi-boot would be something like below. You can remove what is not needed or add on.
Code:

/dev/hda1  Windows OS
/dev/hda2  Windows my documents
/dev/hda3  Second Windows OS
/dev/hda4  Extended
/dev/hda5  Linux swap
/dev/hda7  Linux / (root) for first Linux (this is where the OS goes)
/dev/hda8  Linux /home for first Linux
/dev/hda9  Linux / (root) for second Linux
/dev/hda10 Linux /home for second Linux
/dev/hda11 Linux /whatever for sharing data between the different Linux versions

Your disk will either be /dev/hda as shown above or /dev/sda

The sizes of the partitions depends on the size of your HD and what your primary OS will be. With Windows as the primary OS:
For each Windows OS, I suggest at least 20GB as you still want to install some stuff as well. As you can see, I have allocated a dedicated partition for 'my documents' so there your documents will always be safe in case of a windows re-install. A full Linux OS install takes roughly between 3GB and 5GB. So making those partitions around 10GB should be enough.

Note:
If you're system comes with a recovery disk, it might well remove ALL partitions and setup its own ones.


Wim Sturkenboom 07-12-2009 03:40 AM

Rereading your post :)
Quote:

Originally Posted by pmacdonald (Post 3603828)
When I purchase my laptop it will most likely have either Vista Business or Vista Home Premium on it. I plan to put Vista Ultimate on it because I purchased it when building my custom gaming rig in January. Should I download Vista Ultimate and erase the copy of the other Vista or should I keep both and then install Linux as well?

Linux does not use drive letters but harddisks are devices. For normal systems, /dev/hda, /dev/hdb etc are the physical harddisks (you might have to replace the 'h' by an 's'). /dev/hda1 is the first partition on /dev/hda, /dev/hda2 is the second partition on the first harddisk etc. If you have a seond harddisk, it will be /deb/hdb1, /dev/hdb2 etc.

Windows needs a primary partition for the OS. When you partition a disk, you can indicate that it needs to be a primary partition or an other partition (not sure if the option is logical or extended, I think logial). So /dev/hda1 will be a primary partition.
Anything before /dev/hda4 will be a primary partition, /dev/hda4 will be either primary (and in that case it's the last possible partition) or extended (in which case you can fill it with logical partitoins. The first logical partition will always be /dev/hda5. Anything after that will get consecutive numbers.

You can have a system that only has /dev/hda1, /dev/hda4 and /dev/hda5. I prefer to use the primary partitions first and the same setup will in that case be /dev/hda1 and /dev/hda2.

Talking one Windows OS, one fixed Linux OS and one Linux to play with:
Code:

/dev/hda1  Windows OS
/dev/hda2  Windows my documents
/dev/hda4  Extended
/dev/hda5  Linux swap
/dev/hda7  Linux / (root) for first Linux (this is where the OS goes)
/dev/hda8  Linux /home for first Linux
/dev/hda9  Linux / (root) for second Linux
/dev/hda10 Linux /home for second Linux
/dev/hda11 Linux /whatever for sharing data between the different Linux versions

If the second Linux is really only to play with and not for serious use (so the data on it is not really important), you can combine 9 and 10 and you will not have a separate home partition (and 11 becomes 10). The problem with too many partitions is that one might be full while there is plenty of space on the others.

Another thing to know is the hierarchy on Linux. The directory tree is what it says it is, a directory tree. The root is known as '/'. All other main directories are branches of this directory.
Also partitions are mounted on this tree; as a result you will not immediately be aware that a partition and it usually does not matter.
One of the directories in '/' is '/home'. If you did not make a separate partition for '/home', the directory will indeed be a directory. If you however made a separate partition for it, you need to mount it on this directory. Don't worry, this will automatically be sorted for you during the installation.

Last thing:
Every OS wants to install / installs a so called bootloader. It's mostly installed in the MBR and tehre is only place for one. Windows will (no questions asked) install one, your first Linux wants to install one (usually it will ask you if you don't run an automated install), your second Linux wants to install one etc. Nowadays the Linux ones will at least pickup your windows installation and add that option to a menu. They might or might not pickup other Linux installations. If it picks it up, it will also add an entry in the menu for the 'other' Linux installations. If it does not, you have to manually modify the menu. You can do some research on grub and lilo (the bootloaders used by most Linux distro's).

If you ever reinstall windows (and it does not wipe your disk clean because it was a real recovery CD), it will just overwrite the MBR with its bootloader and you have lost access to Linux. You have to fix this manually.

Hope that this is not an 'information overload' and that it addresses your questions.

pmacdonald 07-13-2009 12:20 AM

That was a lot of information to take it, but helpful.

In your code you have /dev/hda1 then 2 but no 3 or 6. Is there a reason for that?

I'm going to download Ubuntu on my desktop to make sure I have the process right. I'd like to keep all of the files on my computer without wiping anything out though... How should I clean up my current drive?

Just for more information I'm using a single HDD that's 500GB.

Wim Sturkenboom 07-13-2009 12:48 AM

The missing 3 is no mistake. At the moment that you create a logical partition, the extended partition will be created and till now I only have seen number 4 being used for that.

The missing 6 was indeed a mistake. OOPS I was already wondering why I ended up with 11 at the end.

I've only resized a Windows partition once (long ago) so can't help there. As suggested, defragment the drive(s) first. I think that nowadays partition managers can handle the resizing without introducing errors.

There is always a risk that something goes wrong. Being it a power failure or a user mistake, so make backups before you start if it's important data. And try to check how your recovery process works; if you see more partitons than expected in the Windows disk manager (e.g. 2 partitions but you only have drive C), there is a good chance that it's part of the Windows recovery.

pmacdonald 07-13-2009 01:19 AM

I'm still having trouble following on how to implement the drives mentioned above.

I have a partitioning drive manager in Vista Ultimate and it specifies what type of drive it is (primary, etc...) but it just lists the names (C: for example). It doesn't have the names above.

Do I create the partitions before I install any Linux version? I'll start with Ubuntu and then I'll install another distro so I want that partition ready (my tinkering partition).


All times are GMT -5. The time now is 09:31 AM.