UbuntuThis forum is for the discussion of Ubuntu Linux.
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm a complete newbie when it comes to linux, but i decided to take the plunge and installed Ubuntu (5.04) on a spare 20GB hard drive. I'd hoped to get it to dual boot with my installation of Windows XP. I've been through the install prosess and installed the GRUB loader when requested as it successfully recognised my XP installation.
After the required reboot, my system booted straight into XP without even a hint of the GRUB loader. Im at a total loss for what to do now!
It might be worth saying i have 3 hard drives
a Seagate 120Gb With the windows partition on it
a WD 160GB for media
and a Seagate 20Gb with the Linux installation.
Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 5099 40957686 7 HPFS/NTFS
/dev/sda2 5100 14593 76260555 f W95 Ext'd (LBA)
/dev/sda5 5100 8934 30804606 7 HPFS/NTFS
/dev/sda6 8935 14593 45455886 7 HPFS/NTFS
Disk /dev/hdc: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hdc1 2 19457 156280320 f W95 Ext'd (LBA)
/dev/hdc5 2 19457 156280288+ 7 HPFS/NTFS
Disk /dev/hdd: 20.0 GB, 20020396544 bytes
255 heads, 63 sectors/track, 2434 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hdd1 * 1 2330 18715693+ 83 Linux
/dev/hdd2 2331 2434 835380 f W95 Ext'd (LBA)
/dev/hdd5 2331 2434 835348+ 82 Linux swap / Solaris
I cant however seem to find the /boot/grub/menu.lst (i really am a newbie) how i can i find this info?
The root partition of your Linux appears to be in the hdd1 with hdd5 as the swap
If you are booting to a Live CD, as you should be, then you can get inside hdd1 as follow
Log in as root to the Live CD (need admin privilege) and use the terminal mode. In Ubuntu you need to click system, then click root terminal and supply a password.
make a temporary directory call hdd1 in /mnt and mount the partition /dev/ hdd1 on it. The commands are
mkdir /mnt/hdd1
mount /dev/hdd1 /mnt/hdd1
If the Live CD Linux doesn't object to the above your command prompt should change slightly, signifying you are now inside the Ubuntu
the text file that control Grub is /boot/grub/menu.lst
I have Ubuntu 5.10 and the essential entries in your case should be
title Windows xp @ sda1 of Sata disk
root (hd0,0)
chainloader +1
The above lines should boot boot systems. Grub counts from 0 so (hd2,0) means 1st partition of the 3rd disk. You have Sata as the first disk and so (hd0,0) = 1st partition of the first disk.
The kernel name may be different for you 5.04 version so just change the above to the one you have in /boot/grub/menu.lst
Save the file and try to reboot
One more thing the system file may be displayable in the desktop but only editable in root terminal. I believe you can use the graphic edition kwrite with the command
kwrite /boot/grub/menu.lst
Failing that you may have to use Linux 's standard vi editor to modify the file.
Since you are a newbie, and I know how that is, you might want to consider an alternate approach. At this point you don't have anything invested in your Ubuntu installation, so why not reinstall? I think you will be able to avoid the same booting problem.
When the installation gets to the part about installing grub, you will have some options:
- If you didn't let the installer put grub on your master boot record (MBR) last time, that may have caused your boot problem. Install grub on the MBR, finish the installation, reboot, and see if it boots to the grub menu. If so, you should be able to boot to both Windows or Ubuntu.
- If you prefer not to install grub on the MBR, create a boot floppy. Then your machine will boot to Windows unless you push the floopy in at boot time, in which case you will see the grub menu and be able to contunue booting into Ubuntu.
I booted 4 systems with XP after one month in it and 50+ after 1.5 years.
You should find in my post the following techniques which will be useful to any newbie
(1) How to get into a unbootable Linux with a Live CD using the change root technique
(2) The only two methods of booting any system in a PC; (a) by addressing its kernel with the kernel and initrd commands and (b) by chainloading as in the case of Windows
Some information may look nothing important but I boot every one of my 50+ systems using identically the same 3 lines of booting Windows in my previous post, amending only the description in the title line and the partition reference.
I've tried a full reinstall, as suggested - as that was something i was most comfortable with. I opted to put Ubuntu 5.10 (x64 if that matters ?) on this time (i figured i might as well get up to date while im doing this) and made sure i wrote GRUB to the MBR.
Unfortunately that didnt solve any of my problems.
So i moved on to a different approach, i've booted to Ubuntu 5,10 live and (eventually) managed to open a root terminal (following saikee's instructions)
when i type the 'mount dev/hdd1 /mnt/hdd1' line i get:
root@ubuntu:/home/ubuntu# mount dev/hdd1 mnt/hdd1
mount: you must specify the filesystem type
could anyone please tell me what the right syntax is for specifying this ?
Normally a modern Linux does not require to specify a filesystem type, even for non-Linux like the FAT and NTFS of Windows. Older kernels might need such information. I have over 40+ distros and I rarely have to use the -t parameter.
Your can try to specify type ext2 or ext3. The syntax is
mount -t ext2 dev/hdd1 mnt/hdd1, with the filesystem type after -t etc.
Only you would know what filesystem has been created in hdd1. Since the partition type is 83 native Linux the filesystem should be either ext2, ext3 or reiserf I would have thought, so try all three if you have to.
From my experience Linux only asks for the file type when there is something wrong with the partition.
Using the -t ext 3 extention worked, but i was unable to edit the menu.lst
I needed to get to it through the root terminal in order to have 'write permissions' however i could not find the right BASH command for it. i did manage to navigate to the file though exploring the computer tab but it was locked as read only.
I would ask for the comand to execute this (i cant find it for looking), but then im only going to have to post again, for the right lines in the menu.lst to edit, as after looking at it i can see far too many similar entries - i'd be scared i got the wrong one!
so i think maybe i should take a different approach. could anyone point me to a good tutorial for producing a GRUB boot floppy?, then i can get into my distro properly - and learn my way around before asking technical questions!
You can overcome the root privilege problem by typing su or sudo (for superuser) in the shell terminal. Live CD normally would waive the requirement for a password.
The bootable Grub floppy can be created once you have "chroot" to the distressed Linux and type (required root privilege)
grub-install /dev/fd0
Don't forget to pop a floppy into the drive before pressing the enter key of the above.
---------------------------
Lastly you can manually boot Ubuntu using a Grub floppy unattached to an operating system.
Steps to create a Grub floppy unattached to an operating system
Boot a Live Linux that support Grub (Ubuntu Live CD does), find the directory that stores Grub's stage1 (stage2 will be there too), change directory to it and use dd command to write stage1 and stage2 onto the floppy. The resulting Grub floppy will boot you into a Grub shell. Ccommands are
find / -name stage (assuming Linux reports back the directory is /boot/grub)
cd /boot/grub (alter this directory name to suit your own case)
dd if=stage1 of=/dev/fd0 bs=512 cout=1
dd if=stage2 of=/dev/fd0 bs=512 seek=1
Once you can boot into a Grub shell, type help to see the commads available. You also need to know the excat names of the kernel and initrz which are both in /boot directory. Write the files names down. I have Ubuntu 5.0.4 also but my kernel and initrd names may be different to yours if they are from different releases. Nevertheless I use them as an example to show how you can boot a Linux manually (the technique is applicable to all Linux (just alter the kernel & initrd names). Your Ubnuntu is in the 3rd disk 1st partition and that is (hd2,0) to Grub
Steps to boot a Linux manually with Grub
In manually booting Ubnuntu (you can still try it even after you have solve the booting problem) you boot to a Grub shell and type
root (hd2,0)
Grub is being told which is the root partition and will responds by telling you the filingsystem is type 83
I am quite interested in giving Kubuntu a try but I need a quick bit of reassurance before I dive in. For various reasons that I do not need to go into just now I have not installed lilo or GRUB to my MBR - I have boot floppies with both installed so that I always have a way out if I need one Does Kubuntu give the option of not installing a boot loader? I will configure my lilo boot floppy myself after the event. I do not want some nasty auto-install-press-this-button-and-I'll-do-it-all-for-you type set-up that messes up my box
I am trying to avoid any type of boot loader install to hard drive and simply want the option not to install a boot loader. I will amend my lilo floppy from my current Slackware install.
The reason I am pushing the issue is because I have heard of distros that do not ask, they just install a boot loader.
I am being careful because I have not yet found a way of booting WinXP using lilo or GRUB and do not wish to committ to a hard drive install until I know it works from floppy. I made the mistake of having an IDE HD, with a FAT32 partition on it, being connected when I installed WinXP to my SATA drive. WinXP saw the IDE as the first drive, decided to call that FAT32 partition C: and installed its boot loader to the IDE drive. That means that the WinXP system drive is D: and on my SATA drive. My linux install is also on the SATA drive. There is a technical issue of me installing the boot loader to the SATA drive whilst the first stage loader for WinXP is on the IDE drive. There probably is a way of doing it but hey I need a life The floppy solution works really well so I am not too concerned about sticking with that solution - but I do not want to break the system with a rogue distro auto-installing a boot loader.
Have a look at my post on creating a Grub bootable floppy "unattached" to an operating system. That floppy alone boots every of my 50+ systems. Naturally it boots my XP as well.
I understand your arrangement but believe it present no difficulty to Linux. There should be several system files, possibly the hidden boot.ini and NTLDR (or the file to detect NTLDR) in your C that points to the D drive for booting up your XP. Thus boot your C should get XP in the D.
I recommend that you give it a try, say using Lilo
Just add in /etc/lilo.conf
other=/dev/hda1
Label=DOS_XP
and remember to do a
lilo -b /dev/fd0
to update Lilo. Lilo should respond back by telling you DOS_XP added. If Lilo finds hda1 unbootable it wouldn't implement the changes in the floppy so you are quite safe.
----------------------------
If you do manage to create a Grub floppy unattached to an operating system, boot into a Grub prompt then there is a good possibility that your XP can be booted up by these 3 lines
root (hd0,0)
chainloader +1
boot
In booting Windows or DOS both Lilo and Grub "cut and paste" itself with second stage of Windows or DOS. That is why they should boot succesfully at the +1 sector position.
-------------------------------------
Also when worse comes to worst you canb always pop in a bootable DOS floppy and type
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.