Linux - NewbieThis 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!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I recently installed Ubuntu 5.04 i386 on my (only working) desktop computer in the hopes of learning a thing or two about linux, whilst I planned to use dualboot with my Windows XP partition.
In Windows (before installing ubuntu), my windows installation was located on D:\. Not C:\ as it's usually installed on, but I wanted to keep it that way due to the fact that D:\ was my SATA disc.
So I formatted C:\ and E:\ (which was located on the same ATA disc) and installed ubuntu without too much problems. But after 24 hours or so when I wanted to go back to windows, I found that grub couldn't locate my windows installation. This might be because the boot.ini was located on C:\ (I admit it was kinda stupid to install ubuntu without hesitation and without looking one or two things up)
So I do a little trial-and-error in grub, and find that the NTFS partition which I successfully mount in ubuntu (with windows on it) (/dev/sda1) can't be found in grub. I try to edit the line which specifies the harddrive selection and press tab (to find whatever partitions are available), but can only find the hd0, hd1 and fd0 partitions.
Also, during the load of linux, I can't mount the sd1 drive as it's supposed to. Is this due to the SATA drivers only being loaded during the boot of X?
If so, how would I go about to fix it?
I've tried googling, but I dont find anything useful, and I simply dont have time to google all day to find the right answer, so I'm turning to you. What on earth should I do?
Grub and linux number the partitions differently, grub usually is 1 less that linux. Grub's hd0 is very likely /dev/sda1, and hd1 is /dev/sda2 or /dev/sdb depending on how you have the partitions set. If you post your /boot/grub/menu.lst file, we can probably help you to find the right syntax to boot into XP, unless the boot.ini file is gone as you have said.
Thank you for your quick reply.
Here's the menu.lst as you asked. The last entry is an attempt from my side to add Windows XP to grub.
root@niffe:/boot/grub # cat boot/grub/menu.lst
cat: boot/grub/menu.lst: No such file or directory
root@niffe:/boot/grub # cat /boot/grub/menu.lst
# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.
## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
# Hides the menu by default (press ESC to see the menu)
# Pretty colours
#color cyan/blue white/blue
## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret
# title Windows 95/98/NT/2000
# root (hd0,0)
# chainloader +1
# title Linux
# root (hd0,1)
# kernel /vmlinuz root=/dev/hda2 ro
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST
### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default optons below
## DO NOT UNCOMMENT THEM, Just edit them to your needs
## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specifiv kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
# kopt=root=/dev/hdd1 ro
## default grub root device
## e.g. groot=(hd0,0)
## should update-grub create alternative automagic boot options
## e.g. alternative=true
## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(recovery mode) single
# altoptions=(recovery mode) single
## nonaltoption boot targets option
## This option controls options to pass to only the
## primary kernel menu item.
## You can have ONLY one nonaltoptions line
# nonaltoptions=quiet splash
## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
## should update-grub create memtest86 boot option
## e.g. memtest86=true
## ## End Default Options ##
title Ubuntu, kernel 2.6.10-5-386
kernel /boot/vmlinuz-2.6.10-5-386 root=/dev/hdd1 ro quiet splash
title Ubuntu, kernel 2.6.10-5-386 (recovery mode)
kernel /boot/vmlinuz-2.6.10-5-386 root=/dev/hdd1 ro single
title Ubuntu, kernel memtest86+
title Microsoft Windows
### END DEBIAN AUTOMAGIC KERNELS LIST
And yes, I'm pretty sure the boot.ini was destroyed during the installation of ubuntu. (It's always stored in C:\, isn't it?)
Does that ruin all chances of retrieval?
From what you've said, XP resides on a seperate SATA disk (D:\) and you also had C: and E: on you're master disk, which is where Linux is now installed.
That would make Windows location (hd1,0) and the grub.conf file to read:
title Microsoft Windows
Windows does keep some of it's boot info on the C:\ drive even though you installed it to D:\ so it is likely that you have deleted you're boot.ini file, but this isn't a problem really, you could just make a new one with the following(ish!) contents:
Originally posted by 0pal_t0ad did windows boot after formatting C:\ and before installing ubuntu?
I formatted C:\ using ubuntus installer.
Originally posted by 10xOXR Windows does keep some of it's boot info on the C:\ drive even though you installed it to D:\ so it is likely that you have deleted you're boot.ini file, but this isn't a problem really, you could just make a new one with the following(ish!) contents:
Do I actually *need* the boot.ini file in order to boot windows? Because when I write in what you said in menu.lst, windows doesn't load. Something more happens than nothing though. It locks up. So I'd guess something is going on.
Anyways. Thanks to your help I think I've located the problem, to which I have no answer as how to solve; there is no boot.ini on the windows system disc. How do I create it? (note that the windows system disc is NTFS)
booting to repair mode with xp cd, apply command fixmbr
now when u reboot u can c the windows grub
boot to linux if u have boot disks.. good or
by a live cd or the same disk u used to install
chroot if needed
#grubinstall /dev/hda %reinstall grub to mbr
this will install grub to mbr
edit the grub.conf or menu.lst if needed