PDA

View Full Version : Linux questions



jorgen
08-04-2009, 07:28 PM
I'm not familiar with linux at all, and didn't like it, but I want to learn.
I have a lot of them. So lets start with booting:


I've done a linux dual boot setup before.

It went into a different O.S. selection screen, probably linux related.

I have XP, is there a way I can use the microsoft boot screen?

How does booting into linux work?
I know my windows stuff, boot config NTLDR and all that, but not linux.

guinness
08-04-2009, 07:42 PM
for cd/dvd/floppy installation.

I’m not an expert on WindowsNT/2000 by any stretch of the imagination, but I can say that when Windows2000 Pro installs it writes to the master boot record which then points to a file on the root of the system (the C drive in this instance) called “boot.ini”. The “boot.ini” file points to the location of the files necessary to start the OS loading. If you are familiar with Linux and LILO (the LInux LOader) you’ll have an idea of what the “boot.ini” file does, because it acts a little bit like the “lilo.conf” file. Anyways, the “boot.ini” file is what we will be modifying so the windows boot loader knows there is another OS for booting, for now just find it. If you are unable to see it, then you may have “hide system files” turned on.

Open an Explorer window, go to the Tools pull down menu and select Folder Options and then the View tab. There you should see radio buttons to Show hidden files and folders, check it, and uncheck Hide protected operating system files (Recommended), hit OK at the bottom and you should now be able to see boot.ini in the root directory.

the next step is VERY IMPORTANT. You must create a boot disk when the Linux install asks, because we will need to make the boot sector that LILO creates into a file so that the Windows2000 Pro boot loader can use it to start Linux. And since we are not installing LILO to the MBR (Master Boot Record for those who don’t know), you'll have no way of getting Linux to boot and the long setup process will be for naught! .

The "boot disk creation" step in Mandrake’s install process is right before the LILO install, but after the package install, so watch for it and DO NOT skip it!

When you get to the step in setting up LILO you have two choices, install it now or skip the step entirely.

If you choose to install LILO while installing Linux, make ABSOLUTELY sure you install it to the partition that Linux is installed on. Example: You have Windows2000 Pro installed on the primary drive of the primary controller and are installing Linux on a second partition on the same drive. Linux will set partition one of the drive as hda1. Linux assigns hda to the primary drive of the primary IDE controller, hdb to the secondary drive so forth and so on. If you have an ATA66 controller as well as an ATA33 (aka slow ass) controller on your system Linux will likely call the ATA66 drive hde since hda, hdb, hdc and hdd are reserved for the primary/secondary ATA33 controllers and their repsective drives. If SCSI is your thing, Linux uses sd? as the SCSI drive designator with a letter just like the IDE drives. The numbers that follow the drive designators represent the different partitions on the given drive. Now, we have Windows2000 Pro installed on hda1 and during your Linux setup you had to create at least 2 partitions, a main partition and a swap partition, hda5 and hda6 respectively

If you use the auto partition function as found in Mandrake’s install process you might end up with 3 partitions with one of the partitions being the boot partition and mounted as “/boot”. This “/boot” partition is where you should install LILO. If you decided to create your own partitions and didn’t setup a “/boot” partition but just a main “root” partition, which is fine, then install LILO to it. Either way, you must remember what the drive designator and partition number was for the partition you are going to install LILO to.


When the LILO setup begins it will ask where you wish to install it and this is where a few brain cells will come in handy as well as the picture above. Instead of putting it on the MBR of the drive, which in our case is hda, choose to install LILO on the partition I asked you to remember, hda5 for us. Some of you might be asking yourself “why go through all this trouble if I can just boot from a floppy”. Shut up you wussy boy and grow some balls, besides booting from a floppy is slow and we want speed, lots of it to be precise!


If you don’t feel confident enough or are to much of a wimp to go through setting up LILO in the install process, then you can choose not to, but remember MAKE A BOOT DISK! You will be able to install LILO once you get into Linux and yes we will need to install LILO. Now, you have Linux installed and you have a Linux boot disk, go ahead and boot into Linux. If you have opted for a graphical logon, then open a “terminal” window so you can type commands at the command line. Remember, you must be root to run the following commands so either login as “root” or SU to “root”.

i used “vi” to edit the “lilo.conf” file and on Mandrake the file is located in the “/etc” directory but different distributions my have it in other places. The following picture is a line-by-line view of what our “lilo.conf” file looks like. If you have installed LILO during the Linux install process this is a good way to check and make sure it was installed correctly! Pay special attention to the line “boot=”, it must have the partition we installed Linux listed, NOT the partition where Windows2000 Pro is installed.

if you have Linux installed on a different drive, the drive designator and partition number may be different. Just stir up that gray matter between your ears and you should be able to figure it out, if not get up from the computer and step away! Once you have completed the modifications required for your specific system, save the file. Installing LILO is simple, after "lilo.conf" is saved just type at the command prompt “/sbin/lilo” minus the quotes of course!

next step is to extract the Linux boot sector and get it to Windows. I find it easiest to just copy the boot sector to a floppy disk, boot into Windows and copy it off the floppy. To mount the floppy drive in Linux type the following command “mount –t msdos /dev/fd0 /mnt/floppy”

It is very likely that the floppy is already mounted since you did just boot from the darn thing...duh! Insert a DOS formatted floppy so that we can copy the LILO boot sector file to it once the file is created. Note, Mandrake mounts the floppy to the “/mnt/floppy” directory, other distributions may mount it elsewhere!

The following command will copy the LILO boot sector to a file that is 512 bytes big, right to the floppy and called “linux.bin”! Don’t forget to put a DOS formatted floppy in the drive!
“dd if=/dev/hda5 bs=512 count=1 of=/mnt/floppy/linux.bin”

That should do it for the Linux part of this little project. Remove the floppy and boot into Windows2000 Pro normally. Go to “Windows Explorer” and copy the file, “linux.bin”, off the floppy to the root of your Windows2000 Pro drive. Next, open “boot.ini” file in “Notepad” and add the line "c:linux.bin=”Mandrake 7.1” to the end of the file, save it and you are done.

Reboot without any floppies in the drive and viola you should be able to choose which OS you want to boot into! If you have gone and turned off the display of other operating systems, you will need to turn that back on. If you don’t know how or don't remember, right click on “My Computer”, click on “Properties”. This brings up the “System Properties” window, click on the “Advanced” tab and then the “Startup and Recovery” button at the bottom. You should see the first check box unchecked, simply put a check in the box and then set the number of seconds the display is up before booting into the default OS!

hope this has helped you any man.

jorgen
08-04-2009, 10:55 PM
I can't comprehend this right now... I'm gonna try this tomorrow.
Thanks! Great answer.

jorgen
08-05-2009, 07:34 AM
Will I need a floppy for this? Cause if so, I'm gonna have to go find a drive...

guinness
08-05-2009, 09:46 AM
you can use a dvd/cd instead.i just said floppy because some versions of linux still come on a floppy and wasn't sure what version you had or in what hard copy format.just treat the steps where you open,direct,add/remove,etc. like you would if you were to openthe dvd/cd drive and select what songs or titles from that disc you were wanting to play or view.

Ed
08-05-2009, 09:47 AM
if you arent a linux user, try ubuntu distro first. it's the easiest. and you can boot off the cd just to see what it looks like.

jorgen
08-05-2009, 10:29 AM
I tried OpenSUSE, then Ubuntu, then BackTrack.
I'd love to learn backtrack...
but when I tried openSUSE, the only thing I could do was browse the internet. I couldn't even figure out how to install a program I downloaded.

Although, I did figure out how to spoof my MAC address as a Cisco router...

Ed
08-05-2009, 10:31 AM
backtrack is a good one. i don't think its a place to start though.

Jepetto
08-05-2009, 02:00 PM
Fedora 11 has a live boot, so you can start it up and see if you like the looks and feel before you install.

I run vmserver on my desktop so I have have both linux and windows running at the same time.

jorgen
08-05-2009, 02:07 PM
Fedora 11 has a live boot, so you can start it up and see if you like the looks and feel before you install.

I run vmserver on my desktop so I have have both linux and windows running at the same time.

hows that work? I tried that with Mac OSX but it was terrible.
I'm 3G dual core, 2 G ram. It was way to slow.

Jepetto
08-05-2009, 02:18 PM
If your running OSX then your would need to run fusion (www.vmware.com/products/fusion/). How long ago did you try? VMware use to be crap, but it has gotten better.

jorgen
08-05-2009, 04:13 PM
less than 3 months ago... haven't heard of fusion, I'll look it up.

It looks like fusion is Mac to windows?

jorgen
08-20-2009, 08:14 PM
Ok, I'm gonna try it, but I don't have a floppy. I'm gonna use Ubuntu 9.04
It has burning software for CDs?
Whats the command for that?

Paul
08-21-2009, 08:31 AM
hows that work? I tried that with Mac OSX but it was terrible.
I'm 3G dual core, 2 G ram. It was way to slow.

i'm running kalaway ver mac osx + vista on my laptop... it runs great just had a few driver problems w/ original install.

Jepetto
08-21-2009, 09:34 AM
Ok, I'm gonna try it, but I don't have a floppy. I'm gonna use Ubuntu 9.04
It has burning software for CDs?
Whats the command for that?


It should. Im running Fedora 11 currently and it does. If not, you could get one from rpm fusion.

command for what?

Ad-Absurdum
08-26-2009, 03:04 AM
you don't need to use terminal to burn cds in ubuntu. the distro comes with a program called brasero, which can be accessed at applications --> sound & video --> Brasero

ubuntu is made to be as user friendly as possibly, so most stuff has a GUI.

it's very straight forward and easy to understand.

jorgen
08-26-2009, 09:57 AM
I went through the whole process of installing, put the boot file on my flash drive, and go figure, the partition on the flash drive corrupted.
I've heard you can put linux on a flash drive and boot in like 35 seconds though...
I'm gonna try that.