LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices

Reply
 
Search this Thread
Old 01-23-2008, 07:16 AM   #1
retaednim
LQ Newbie
 
Registered: Jan 2008
Posts: 1

Rep: Reputation: 0
Grub error prevents booting


I have ubuntu installed on my laptop, and was attempting to make a live USB installation. Somehow, I displaced the grub files and now when i try to boot, I get grub error 21.

I have tried grub-install with the SAMlinux live cd, but grub cannot find the boot files on my harddrive.

I am positive that the OS is still installed, but I cannot repair grub!


thank you.
 
Old 01-23-2008, 08:54 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,286

Rep: Reputation: 1029Reputation: 1029Reputation: 1029Reputation: 1029Reputation: 1029Reputation: 1029Reputation: 1029Reputation: 1029
I don't like the wrapper - I prefer the "native" grub commands, but if you pass it the --root-directory you should be right.
Maybe try the super grub disk - it's designed for grub recovery.
 
Old 01-23-2008, 09:05 AM   #3
Person_1873
Member
 
Registered: Sep 2007
Location: Australia
Distribution: Arch Linux
Posts: 489

Rep: Reputation: 39
as grub loads up, b4 u enter the os, ie press ESC while grub is loading, then press "c", this will drop you into a command line

type "root ("
then press tab
this will give you a list of devices grub can use, i'm not sure what your usb drive would be called, possibly hd1, but that could also be your second HDD, this all depends on your bios settings,

once you got your root command which should look something like

"root (#d#)"

*# is replacing the letters i'm not sure about

type the next command which is kernel, now this one is fairly strait forward, it's gonna be

"kernel /boot/vmlinuz-2.6.[TAB] root=/dev/sd## splash quiet ro --"
then press enter

tab will fill in the rest of the filename, those two hash's represent the drive name as recignised by ubuntu, you'll want it to be the device name of your usb drive.

next command is even more simple, initrd.

"initrd /boot/initrd[TAB]"
press enter

as before tab will fill in the rest of the file name

now just type boot, hit enter and your away, keep note of what you put in so that you can change you "menu.lst" file later, this is stored in /boot/grub/menu.lst
and then you should have a fully functional usb ubuntu drive XD

Last edited by Person_1873; 01-23-2008 at 09:07 AM.
 
  


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
Error on GRUB upon booting. LoserDude27 Fedora - Installation 4 01-23-2006 09:48 AM
Old installation of GRUB prevents me from using LILO and booting into Slackware! EThitop Slackware 6 12-12-2004 12:07 PM
help with booting/grub error 17 wrat Linux - Newbie 3 06-06-2004 11:15 AM
Grub prevents bootup rip Linux - General 3 04-15-2004 09:27 AM
Geforce card prevents booting in Linux with GUI, HELP! Praxis Linux - Software 5 01-19-2004 01:20 AM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration