You are not logged in.

#1 2011-08-28 16:51:02

1archgamenon2
Banned
Registered: 2011-07-12
Posts: 201

grub broken!...

hi there...people i need to fix the grub that was erased after a partition resize,honestly Supergrub couldn't repair,neither few commands...ideas please!

edit: first i'm going to format the new space i did(which was the culprit of all this)

Last edited by 1archgamenon2 (2011-08-28 17:04:58)

Offline

#2 2011-08-28 17:43:47

schlumpfimsumpf
Member
Registered: 2011-08-13
Posts: 29

Re: grub broken!...

You can boot with a live cd or usb-stick and recover grub.
Is grub not in mbr any more or is it just not finding the kernel image any more ?

Offline

#3 2011-08-28 17:49:25

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: grub broken!...

when you say supergrub didn't work  -- what happened. errors ?

and what does "neither few commands" mean? What commands did you use?

post them here.


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#4 2011-08-28 18:05:32

schlumpfimsumpf
Member
Registered: 2011-08-13
Posts: 29

Re: grub broken!...

If my grub is broken (mostly after trying windows once more) i boot into some live cd. Mounting my normal Linux. Binding /dev /sys and /proc to my installations /dev /sys and /proc chrooting to the installation on my hdd ( the live cd hase to use the same architecture as the one one your hdd otherwise chroot wont work). In my chroot enviroment i just have to run grub-install /dev/sdx (x for the hdd you want to use). Im using grub2 but there should be an equivalent skript grub-install skript for grub lagecy.

Offline

#5 2011-08-28 19:27:41

1archgamenon2
Banned
Registered: 2011-07-12
Posts: 201

Re: grub broken!...

i think all is due to the kernel 3 *[is it just not finding the kernel image any more ?]* plus my mistake resizing win's partition!
-----------------------------------------------------------------
vmlinuz26 ==>vmlinuz-linux

kernel26.img ==> initramfs-linux.img

kernel26-fallback.img ==> initramfs-linux-fallback.img
-----------------------------------------------------------------
give me a chance to post details...

i'd prefer install grub2 if is possible!

Last edited by 1archgamenon2 (2011-08-28 19:32:37)

Offline

#6 2011-08-28 21:16:00

cbowman57
Member
Registered: 2011-08-21
Posts: 77

Re: grub broken!...

I'm new to Arch myself so still learning a lot.  Not sure if it works with grub legacy or not but Rescatux has bailed me out of a lot of grub related jams. http://www.supergrubdisk.org/category/download/

If you can get back into your Arch installation grub2 is available in the repository, os-prober is available from AUR.

Offline

#7 2011-08-29 20:11:39

1archgamenon2
Banned
Registered: 2011-07-12
Posts: 201

Re: grub broken!...

well...i instaled ubuntu 9.10 in other partition and get this error when choose arch on buntu's grub:

ERROR: Unable to determine the file system type of /dev/sda3:

Either it contains no filesystem unknown filesystem,or more than one validile system signature was found.

Try adding
               rootfstype=your_filesystem_type to the kernel command line.

You are now being dropped into an emergency shell.

sh: can't access tty:job control turned off

[ramfs /]#

what to do friends? don't want to loose arch!

Last edited by 1archgamenon2 (2011-08-29 20:35:05)

Offline

#8 2011-08-29 20:39:42

Fixxer
Member
From: Poland
Registered: 2011-08-29
Posts: 210

Re: grub broken!...

First of all, run *buntu live-cd. Check out, if your Arch Linux partitions are mounted:

sudo cat /etc/mtab

If they are, umount them:

sudo umount /dev/sdaX

X -> number of partition. After that run this from the terminal (for all of partitions):

sudo fsck /dev/sdaX

If system doesn't boot - run Arch Linux live-cd, then recover your Grub:
#1

grub [Enter]

Prompt of running Grub looks like this:

grub>

#2

find /boot/grub/stage1

#3

root (hdX,X)

X,X - it's result of previous command (#2)
#4

setup (hd0)

#5

quit

#6
Reboot your system and set BIOS to boot from HDD.

Last edited by Fixxer (2011-08-29 20:40:41)

Offline

#9 2011-08-29 21:01:08

1archgamenon2
Banned
Registered: 2011-07-12
Posts: 201

Re: grub broken!...

/boot/grub/grub.cfg [ubuntu]

menuentry "Arch Linux (on /dev/sda4)" {
    insmod ext2
    set root=(hd0,4)
    search --no-floppy --fs-uuid --set 57426b9a-bcea-431f-a269-a5b840243277
    linux /boot/vmlinuz26 root=/dev/sda3 ro fastboot logo.nologo quiet
    initrd /boot/kernel26.img
}
menuentry "Arch Linux Fallback (on /dev/sda4)" {
    insmod ext2
    set root=(hd0,4)
    search --no-floppy --fs-uuid --set 57426b9a-bcea-431f-a269-a5b840243277
    linux /boot/vmlinuz26 root=/dev/sda3 ro
    initrd /boot/kernel26-fallback.img
}

is there somethig (or all) wrong?

Last edited by 1archgamenon2 (2011-08-29 21:14:12)

Offline

#10 2011-08-29 21:07:43

Fixxer
Member
From: Poland
Registered: 2011-08-29
Posts: 210

Re: grub broken!...

Grub 0.97 (e.g. Arch Linux, Fedora , PCLinuxOS) counts disks and partitions from 0 [zero]. Grub 2 (1.99) (e.g. Ubuntu) counts disks from 0 [zero] but partitions from 1 [one] If your main filesystem "/" is on the /dev/sda4, then menuentry should look that:

menuentry "Arch Linux (on /dev/sda4)" {
    insmod ext2
    set root=(hd0,4)
    search --no-floppy --fs-uuid --set 57426b9a-bcea-431f-a269-a5b840243277
    linux /boot/vmlinuz26 root=/dev/sda3 ro fastboot logo.nologo quiet
    initrd /boot/kernel26.img

Be sure, that UUID of root partition is correct:

blkid | grep /dev/sda4

E.g.; in Grub 0.97 you should add numbers 0,3.

Last edited by Fixxer (2011-08-29 21:13:08)

Offline

#11 2011-08-29 21:18:07

1archgamenon2
Banned
Registered: 2011-07-12
Posts: 201

Re: grub broken!...

Fixxer wrote:

Be sure, that UUID of root partition is correct:

blkid | grep /dev/sda4

how do i do that? on live cd/buntu OS/arch's shell(sh:) #

i think ain't following u...

Last edited by 1archgamenon2 (2011-08-29 21:22:05)

Offline

#12 2011-08-29 21:23:54

Fixxer
Member
From: Poland
Registered: 2011-08-29
Posts: 210

Re: grub broken!...

1archgamenon2 wrote:

on live cd/buntu OS/arch's shell(sh:) #

Whatever ... Open terminal at Ubuntu live-cd session:

sudo blkid

Check out if UUID is the same in /boot/grub/grub.cfg. If you want edit it, mount /dev/sda4 partition:

sudo mount /dev/sda4 /media

Then:

sudo nano /media/boot/grub/grub.cfg

Make changes, save changes, reboot ...

Offline

#13 2011-08-29 21:36:36

1archgamenon2
Banned
Registered: 2011-07-12
Posts: 201

Re: grub broken!...

yep it is correct!
/dev/sda4: UUID="57426b9a-bcea-431f-a269-a5b840243277" TYPE="ext4"
[from buntu OS] not live cd!

Last edited by 1archgamenon2 (2011-08-29 21:38:45)

Offline

#14 2011-08-29 21:43:49

Fixxer
Member
From: Poland
Registered: 2011-08-29
Posts: 210

Re: grub broken!...

Try to boot you Arch Linux from HDD ;]

Offline

#15 2011-08-29 22:54:56

1archgamenon2
Banned
Registered: 2011-07-12
Posts: 201

Re: grub broken!...

Fixxer wrote:

Try to boot you Arch Linux from HDD ;]

did u read post #7?

ERROR: Unable to determine the file system type of /dev/sda3:

Either it contains no filesystem unknown filesystem,or more than one validile system signature was found.

Try adding
               rootfstype=your_filesystem_type to the kernel command line.

You are now being dropped into an emergency shell.

sh: can't access tty:job control turned off

[ramfs /]#

Offline

#16 2011-08-30 09:38:37

Fixxer
Member
From: Poland
Registered: 2011-08-29
Posts: 210

Re: grub broken!...

Did you read post # 10.

Grub 0.97 (e.g. Arch Linux, Fedora , PCLinuxOS) counts disks and partitions from 0 [zero]. Grub 2 (1.99) (e.g. Ubuntu) counts disks from 0 [zero] but partitions from 1 [one] If your main filesystem "/" is on the /dev/sda4, then menuentry should look that ...

ERROR: Unable to determine the file system type of /dev/sda3:

If your Arch Linux main filesystem if on /dev/sda4 in /boot/grub/grub.cfg can't be /dev/sda3 ! It must be /dev/sda4. *buntu is ising Grub_2 (1.99).

Last edited by Fixxer (2011-08-30 09:40:21)

Offline

#17 2011-09-01 17:43:26

1archgamenon2
Banned
Registered: 2011-07-12
Posts: 201

Re: grub broken!...

i no this is not correct,but 4me the solution was new installation...thx anyway to all of u!

Offline

Board footer

Powered by FluxBB