LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 08-29-2010, 11:11 PM   #1
Msi100SuSe10
LQ Newbie
 
Registered: Jan 2010
Posts: 17

Rep: Reputation: 0
Grub 0.97 CLI to load kernel, and boot on OpenSuse10


BIG mistake ! I unfortunately remove "some" softwares on my OpenSuse10 (preinstalled on my laptop, without cd driver) cause I was running out of space on hd. Icons starts to dissappear ...
Then I have only the Grub 0.97 shell that appears and to use to solve the problem... tried to boot kernel, but said that it "must be loaded before boot".

In the Grub 0.97 black window I have two lines :
First line ; kernel (hd0,2)/boot/vmlinuz-2.6.16.46-0.12-smp rrot=/dev/sda3 vga=0x314 reume=/dev/sda2 splash=silent showopts
Second line ;initrd (hd0,2)/boot/initrd-2.6.16.46-0.12-smp

I press "b", to boot with the First line : kernel (hd0,2)/boot/vmlinuz ... but the window turns blue and said "all data would be lost", so it shut down the system automatically to avoid this.
I press "e" to edit the command in the boot sequence for the same line, but don't really know what to tell Grub to do.

I must get my important datas back on my hd before "Restore to factory settings" (the last option). Any solution ?

Maybe it is a step on a solution ?
From http://www.linux-live.org/, I downloaded linux kernel 2.6.27.27 on a usb memory stick. Could it be useful ? how to ?

Last edited by Msi100SuSe10; 08-30-2010 at 08:37 AM. Reason: add : press "b", to boot with the First line : kernel ...
 
Old 08-29-2010, 11:57 PM   #2
yancek
Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 5,108

Rep: Reputation: 816Reputation: 816Reputation: 816Reputation: 816Reputation: 816Reputation: 816Reputation: 816
Is Opensuse the only operating system on the computer? If not, what others do you have?

Do you mean you do not have a CD drive or you do not have the Opensuse installation CD?

What software were you removing?
Do you have any Linux Live CD you can use to mount the Opensuse partition to show /boot files. Also, can you post partition information? fdisk -l command run as root from a Live CD
 
Old 08-30-2010, 07:51 AM   #3
Msi100SuSe10
LQ Newbie
 
Registered: Jan 2010
Posts: 17

Original Poster
Rep: Reputation: 0
Opensuse is the only operating system on my computer.
i do not have a CD drive.
Software I were removing ? I can't tell.
The only command lines I can do with Grub 0.97 are :
blocklist boot cat chainloader cmp color configfile debug displayapm enbed find fstest geometry halt help hide impsprobe initrd install ioprobe kernel lock makeactive map md5crypt modele modulenounzip pager partnew parttype password pause read reboot root rootnoverify savedefault serial setkey setup terminal terminfo testload testvbe unhide uppermem vbeprobe

My partition information:
I did : grub> cat /etc/fstab
/dev/sda1 / ext3 noatime,noacl,..
arrier=1 1 1
/dev/sda4 /media/data ext3 defaults 1 1
/dev/sda2 swap swap defaults 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs noauto 0 0
debugfs /sys/kernel/debug debugfs noauto 0 0
usbfs /proc/bus/usb usbfs noauto 0 0
devpts /dev/pts devpts mode=0620, gid=5

I did ; grub> root
(hd,0,0); Filesystem type is ext2fs, partition type 0x83

Last edited by Msi100SuSe10; 08-30-2010 at 08:29 AM.
 
Old 08-30-2010, 09:29 AM   #4
Ahmed
Member
 
Registered: May 2005
Location: München, Germany
Distribution: Slackware
Posts: 386

Rep: Reputation: 41
You could try any live distribution that you can boot from USB, seeing that you have no CD drive. This linux-live.org doesn't seem to serve your purpose well, as you're better off with a complete distribution. I suggest Slax.

With this you can either see what files you have left on /boot, 'chroot' into your old system and try to restore what you have deleted (provided there are logs of your package manager), or move your files to an external drive and restore the factory settings.

-A
 
Old 08-30-2010, 10:13 AM   #5
Msi100SuSe10
LQ Newbie
 
Registered: Jan 2010
Posts: 17

Original Poster
Rep: Reputation: 0
What is a command line in GRUB to move my files to an external drive ?
 
Old 08-30-2010, 10:15 AM   #6
yancek
Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 5,108

Rep: Reputation: 816Reputation: 816Reputation: 816Reputation: 816Reputation: 816Reputation: 816Reputation: 816
Before doing anything I suggest below, can you use the grub command "geometry" (without quotes) to output partition info: at the grub prompt type: geometry (hd0), post the output here.

Not having a CD drive does complicate things. However, I would agree with Ahmeds suggestion above to download a distribution you can put on a USB drive. Slax is a good option and is small (200MB) enough to fit on even the smallest USB stick. Here is a link to the download page:

http://www.slax.org/

The download link is on the lower left. On the lower right is a "Read Manuals" link, click that and under "Slax for Users" click on "Slax Distribution: Slax for USB" which will have detailed instructions on getting Slax on a bootable USB. Be sure to read and understand before trying to put Slax on the USB.

It would then be useful to run the fdisk command I suggested above. Slax usually runs as "root" user with a password of "toor".

I notice in your original post that your kernel line shows kernel(hd0,2) and your fstab shows no sda3 partition? It also shows ext3 filesystems on sda1 and sda4 and swap on sda2? I'm wondering what happened to sda3?
 
Old 08-30-2010, 10:32 AM   #7
Msi100SuSe10
LQ Newbie
 
Registered: Jan 2010
Posts: 17

Original Poster
Rep: Reputation: 0
How to make slax-6.1.2 bootable from usb on GRUB

grub> geometry (hd0)
drive 0x80: C/H/S = 1023/255/63, The number of sectors = 625142448, LBA
Partition num : 0, Filesystem type is ext2fs, partition type 0x83
Partition num : 1, Filesystem type unknown, partition type 0x82
Partition num : 2, Filesystem type is ext2fs, partition type 0x83
Partition num : 3, Filesystem type is ext2fs, partition type 0x83


ok, now slax-6.1.2 extracted on my usb.

Your assistance will be all appreciated to help me for step by step command lines to use extracted Slax with grub.

usb is detected:
grub> root (hd1,0)
Filesystem type is fat, partition type 0xb

I tried :
grub> rootnoverify (hd1,0)
grub> chainloader +1
grub> makeactive (hd1,0)
grub> boot kernel (hd1,0)
Non-system disk


What am I missing ?
How to make slax-6.1.2 bootable ?

Last edited by Msi100SuSe10; 08-30-2010 at 01:26 PM.
 
Old 08-31-2010, 12:39 PM   #8
yancek
Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 5,108

Rep: Reputation: 816Reputation: 816Reputation: 816Reputation: 816Reputation: 816Reputation: 816Reputation: 816
Are you sure your root partition is sda3? What is on sda1, that would be the more logical place for boot files. Have you tried the following from a grub prompt on booting Opensuse:

grub> root (hd0,0)
grub> kernel (hd0,0)/boot/vmlinuz-2.6.16.46-0.12-smp rrot=/dev/sda1 vga=0x314 reume=/dev/sda2 splash=silent showopts
grub> boot


Here are the instructions from Slax site:

Quote:
When Slax is unpacked to your device, it will create '/boot/' and '/slax/' directories there. Only one more step is needed to make Slax boot from your USB device or disk: you have to manually navigate to the newly created /boot/ directory and run bootinst.sh script (if you are in Linux) or bootinst.bat script (if you are in Windows).
You need to navigate to the boot directory of the Slax /boot directory in a terminal and run ./bootinst.sh or bash bootinst.sh.
 
Old 09-01-2010, 02:56 AM   #9
Msi100SuSe10
LQ Newbie
 
Registered: Jan 2010
Posts: 17

Original Poster
Rep: Reputation: 0
grub> kernel (hd0,0)/boot/vmlinuz-2.6.16.46-0.12-smp rrot=/dev/sda1 vga=0x314 reume=/dev/sda2 splash=silent showopts
Error 15 : File not found

grub> kernel (hd1,0)boot/vmlinuz-2.6.16.46-0.12-smp rrot=/dev/sda1 vga=0x314 reume=/dev/sda2 splash=silent showopts

Error 15 : File not found

I can't navigate to the boot directory of the Slax /boot directory in a terminal, I can only acess Grub shell.

grub> root (hd1,0)
grub> kernel /boot/vmlinuz
[Linuz-bzImage, setup=0x2e00, size=0x411a30]
grub> boot

then hundreds of script lines write, and the last ones ;

VFS: Cannoot open root devide "<NULL>" or unknown-block(3,6)
Please append a correct "root=" boot option ; here are the available partitions;
0800 312571224 sda driver : sd
0801 20988922 sda1
0802 2104515 sda2
0803 9767520 sda3
0804 279707715 sda4
Kernel panic - not syncing : VFS : Unable to mount root fs to unknown-blck (3,6)

Last edited by Msi100SuSe10; 09-01-2010 at 03:48 AM.
 
Old 09-02-2010, 05:47 AM   #10
Msi100SuSe10
LQ Newbie
 
Registered: Jan 2010
Posts: 17

Original Poster
Rep: Reputation: 0
thank you Yancek and Ahmed,
I made Slax boot from my USB disk on Windows, because of my inability to navigate into GRUB ...
Still have to study and make more mistakes (!)
 
  


Reply

Tags
extract, from, grub, how, usb


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 Boot Load Help JamesP_69 Linux - Software 4 09-03-2006 07:22 AM
Only get Grub cli promt on boot up MurX Linux - General 7 06-07-2006 04:34 AM
Grub won't load on dual boot with XP DuuhMojo Linux - Newbie 4 06-10-2005 04:07 PM
grub doesn't auto-load kernel, time/date auto-change, k3b cannot load kenji1903 Red Hat 16 03-27-2005 09:48 PM
Load Kernel from GRUB manudath Linux - Newbie 6 10-05-2004 10:30 AM


All times are GMT -5. The time now is 08:58 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration