LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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!

Notices


Reply
  Search this Thread
Old 05-02-2008, 08:29 PM   #1
slipa
LQ Newbie
 
Registered: May 2008
Posts: 7

Rep: Reputation: 0
Unhappy Yet another Grub 1.5 Error 21 question.


Hi,
I realise this is a very heavily covered topic, but I need to ask anyway. I hope someone out there can help me.
So I downloaded the latest version of Ubuntu (8.04 i think) and burnt a CD. I then made the fatal error of installing it to a 6gb CompactFlash Microdrive which was connected via an inbuilt card reader. Ubuntu gave me this option, and I thought "hey! i'll just stick it on there instead of doing a partition"
So it installed, asked me to reboot, and straight away i get the Error 21 message, and thats it. nothing. My computer at that point just stops and nothing works. No windows, no ubuntu, regardless of whether the MicroDrive is plugged in. I'm currently running ubuntu off the CD.
I'm a COMPLETE newbie here. I've been trying to read up on the problem on various forums but I litterally don't understand a word of whats being said. I dont know what Grub is, or MBR, or any of the things that keep getting mentioned.
I guess what i want to know is, is there some way i can fix this problem and get windows back through this Ubuntu Cd?
Any help VERY MUCH APPRECIATED, but please treat me as a newbie who has zero understanding of the various techie terms! All i know so far is how to open Terminal, but if someone can help me out and explain in lame man terms, i'm not afraid to tinker around.
THANKYOU!
 
Old 05-02-2008, 09:28 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,054

Rep: Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915
Pretty easy to fix. Did you only have Windoze on the machine prior to your little escapade ???.
From the liveCD, enter this at a terminal, and post the complete output here
Code:
sudo fdisk -l
(that's a lower case ell, and I don't know if sudo will ask for a password - if so, try it without sudo)
 
Old 05-02-2008, 09:35 PM   #3
slipa
LQ Newbie
 
Registered: May 2008
Posts: 7

Original Poster
Rep: Reputation: 0
Thankyou for taking on my problem!!

yeaup, only windows.

here's what i get.


ubuntu@ubuntu:~$ sudo fdisk -l

Disk /dev/sda: 250.0 GB, 250000000000 bytes
255 heads, 63 sectors/track, 30394 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x41ab2316

Device Boot Start End Blocks Id System
/dev/sda1 1 9 72261 de Dell Utility
/dev/sda2 * 10 29982 240758122+ 7 HPFS/NTFS
/dev/sda3 29983 30393 3301357+ db CP/M / CTOS / ...

Disk /dev/sdb: 6144 MB, 6144284672 bytes
255 heads, 63 sectors/track, 747 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00043799

Device Boot Start End Blocks Id System
/dev/sdb1 1 708 5686978+ 83 Linux
/dev/sdb2 709 747 313267+ 5 Extended
/dev/sdb5 709 747 313236 82 Linux swap / Solaris
ubuntu@ubuntu:~$
 
Old 05-02-2008, 09:35 PM   #4
comprookie2000
Gentoo Developer
 
Registered: Feb 2004
Location: Fort Lauderdale FL.
Distribution: Gentoo
Posts: 3,291
Blog Entries: 5

Rep: Reputation: 56
What guide did you use to install it? i think you are going to have to fix the mbr.
Sounds like you installed ubuntu to the flash drive and mbr was overwriten by grub.
if you want to get windows back;
http://www.windowsinternals.com/fixi...r-with-fixmbr/
Then just install ubuntu on a hard drive.
 
Old 05-02-2008, 09:43 PM   #5
slipa
LQ Newbie
 
Registered: May 2008
Posts: 7

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by comprookie2000 View Post
What guide did you use to install it? i think you are going to have to fix the mbr.
Sounds like you installed ubuntu to the flash drive and mbr was overwriten by grub.
if you want to get windows back;
http://www.windowsinternals.com/fixi...r-with-fixmbr/
Then just install ubuntu on a hard drive.

I used a guide on the ubuntu site, but basically all i did was burn the CD and then follow the install wizard.
I'm not sure what MBR is but i'll give your suggestion a go, but I don't know if i have a windows XP cd... although i think i miiiiiiiiight possibly have a recovery cd somewhere. Unfortunately if I have either they arent accessible to me at the moment because im not at home where they'd be.
Any way to do a fix using just this Ubuntu CD im running at the moment, or am i screwed until i can get the XP cd's?
 
Old 05-02-2008, 09:47 PM   #6
comprookie2000
Gentoo Developer
 
Registered: Feb 2004
Location: Fort Lauderdale FL.
Distribution: Gentoo
Posts: 3,291
Blog Entries: 5

Rep: Reputation: 56
Try this;
http://www.arsgeek.com/?p=3340
 
Old 05-02-2008, 09:52 PM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,054

Rep: Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915
Too slow ... (same link as above)

Last edited by syg00; 05-02-2008 at 09:53 PM. Reason: deleted redundant post
 
Old 05-02-2008, 10:04 PM   #8
slipa
LQ Newbie
 
Registered: May 2008
Posts: 7

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by comprookie2000 View Post
in that link it says

Quote:
The two important bits are the ‘/dev/sda1‘ which is the partition itself and the ‘NTFS‘ which tells us it’s a Windows formatted partition. So your Windows partition exists on your drive sda and it’s partition 1. The MBR for drive sda (assuming you boot into windows using it’s native boot loader) is what you want to repair.

We want to fix the MBR on /dev/sda. To do so, type:

Quote:
sudo ms-sys -m /dev/sda

so judging by what i posted before my widows formatted partition is sda2.... right? but so what?! i dont get what that tells me, cos that page says to look for that, but then the code he types in doesnt make any mention of it.... Is it purely to find out if SDA is the one with my windows, as opposed to SDB which is my 6gb microdrive?
What do I personally need to type in for that step, judging by what i got from doing the fdisk -l ? Sorry for being so dumb, I just dont wanna get this wrong and i dont fully understand.

Last edited by slipa; 05-02-2008 at 10:06 PM.
 
Old 05-02-2008, 10:11 PM   #9
comprookie2000
Gentoo Developer
 
Registered: Feb 2004
Location: Fort Lauderdale FL.
Distribution: Gentoo
Posts: 3,291
Blog Entries: 5

Rep: Reputation: 56
sudo ms-sys -m /dev/sda
 
Old 05-02-2008, 10:28 PM   #10
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,989

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Grub is a bootloader, in XP the bootloader is ntldr. When your computer boots, it does a POST, memory check, checks drives, etc then it looks for the MBR (master boot record) which is at a specific physical location on every hardrive. If it doesn't find anything suitable (Grub, Lilo, Ntldr, etc.) it stops. The MBR doesn't actually contain the bootloader but only a tiny part of it which basically point to where the real bootloader is (an over-simplification).

I don't know anything about CompactFlash MicroDrives but it seems they are primarily used for photography but can be used for pretty much anything. Small size and speed seem to be their primary advantages. I did a minimal google on this and found a couple of sites on booting Linux/XP from a flash drive and it didn't look that simple, to me anyway.

Did you format this drive? Were you booting from windows before? Did you have Ubuntu or any other Linux OS on the machine? You installed Grub obviously but it can't find your disk and there could be a number of reasons for this.

Is your intention to try to fix your windows mbr or re-install ubuntu, or both?

Your last post: the sda2 is your windows partition, the website uses sda1 as an example. Using the command posted with just sda should repair your windows mbr which is why it used 'sda' not 'sda2'. I'm not familiar with this command or program so...good luck.

Last edited by yancek; 05-02-2008 at 10:34 PM.
 
Old 05-02-2008, 10:30 PM   #11
slipa
LQ Newbie
 
Registered: May 2008
Posts: 7

Original Poster
Rep: Reputation: 0
this is what i get in Terminal when i follow those steps. Any suggestions? THANKYOU!

Quote:
ubuntu@ubuntu:~$ sudo apt-get install ms-sys
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package ms-sys
ubuntu@ubuntu:~$ sudo fdisk -l

Disk /dev/sda: 250.0 GB, 250000000000 bytes
255 heads, 63 sectors/track, 30394 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x41ab2316

Device Boot Start End Blocks Id System
/dev/sda1 1 9 72261 de Dell Utility
/dev/sda2 * 10 29982 240758122+ 7 HPFS/NTFS
/dev/sda3 29983 30393 3301357+ db CP/M / CTOS / ...

Disk /dev/sdb: 6144 MB, 6144284672 bytes
255 heads, 63 sectors/track, 747 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00043799

Device Boot Start End Blocks Id System
/dev/sdb1 1 708 5686978+ 83 Linux
/dev/sdb2 709 747 313267+ 5 Extended
/dev/sdb5 709 747 313236 82 Linux swap / Solaris
ubuntu@ubuntu:~$ sudo ms-sys -m /dev/sda
 
Old 05-02-2008, 10:36 PM   #12
slipa
LQ Newbie
 
Registered: May 2008
Posts: 7

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by yancek View Post
Grub is a bootloader, in XP the bootloader is ntldr. When your computer boots, it does a POST, memory check, checks drives, etc then it looks for the MBR (master boot record) which is at a specific physical location on every hardrive. If it doesn't find anything suitable (Grub, Lilo, Ntldr, etc.) it stops. The MBR doesn't actually contain the bootloader but only a tiny part of it which basically point to where the real bootloader is (an over-simplification).

I don't know anything about CompactFlash MicroDrives but it seems they are primarily used for photography but can be used for pretty much anything. Small size and speed seem to be their primary advantages. I did a minimal google on this and found a couple of sites on booting Linux/XP from a flash drive and it didn't look that simple, to me anyway.

Did you format this drive? Were you booting from windows before? Did you have Ubuntu or any other Linux OS on the machine? You installed Grub obviously but it can't find your disk and there could be a number of reasons for this.

Is your intention to try to fix your windows mbr or re-install ubuntu, or both?
Thank you for describing what the various things mean. The micro drive im using is taken from my old ipod mini, but i've been using it for a very long time to transfer files between PC's and also in my camera. I formatted it before i did anything linux related with it. I think it was something like fat32??? im not sure.

Anyway, at the moment my primary concern is getting windows XP back. Ubuntu/linux really isnt important to me at the moment, i was only trying to install if to see what its like out of curiosity. My PC only had XP and no other operating systems, and always automatically went straight to XP when turned on.
 
Old 05-02-2008, 10:51 PM   #13
comprookie2000
Gentoo Developer
 
Registered: Feb 2004
Location: Fort Lauderdale FL.
Distribution: Gentoo
Posts: 3,291
Blog Entries: 5

Rep: Reputation: 56
Try to enable extra repositories;
http://monkeyblog.org/ubuntu/install...a_repositories
http://monkeyblog.org/ubuntu/installing/

Last edited by comprookie2000; 05-02-2008 at 10:52 PM.
 
Old 05-02-2008, 11:00 PM   #14
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,989

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
You can read and write to fat32 partitions with Linux but not install to one. I also believe that in order to boot from a flash drive you need an ide adapter.

I expect you will need to get your windows recovery CD to repair. I'm not familiar with the program you were trying to download to repair so have no suggestions.

It seems as though you chose the default option to install the Grub bootloader to the mbr which wrote over your windows mbr. If you can access another computer, you could download SuperGrubDisk which should be able to repair your windows mbr. You won't be able to do that running just a Live CD which is also why the 'ms -sys' didn't work.

When you get your windows fixed and decide to try Linux, I would suggest trying out a few Live CD's first. That way you won't install to your hardrive and you will be able to familiarize yourself with the system and various programs.

Good Luck.
 
Old 05-02-2008, 11:06 PM   #15
slipa
LQ Newbie
 
Registered: May 2008
Posts: 7

Original Poster
Rep: Reputation: 0
thankyou both for your help. I need to go now, but i will give your suggestions a try and report back tomorrow.

Again, thank you!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Grub error 17, and wont reinstall using grub-install! chiefreborn Linux - General 6 06-06-2007 11:29 AM
Two things: (Probably Simple) Grub question, and a gDesklets question Wilffo Linux - Software 3 05-20-2006 02:33 PM
GRUB error question PipeDreams Debian 4 03-18-2006 08:19 AM
Grub Error 17: Cannot mount selected partition and other Grub problems Sebastian Naitsabes Linux - General 1 07-05-2005 09:33 AM
Not your regular GRUB question - just a short question for a fried MBR!! ziphem Linux - General 3 01-31-2005 02:51 PM


All times are GMT -5. The time now is 10:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration