You are not logged in.

#1 2011-02-09 20:38:36

aluser
Member
Registered: 2011-01-16
Posts: 119

[SOLVED] Upgrading to grub2

I've tried to update to grub2 earlier today. After reading the archwiki article dedicated to grub2 I could'nt find the part where it says to upgrade. So I've followed this instructions instead, but failed miserably. I ran these commands which seem reasonable for a newbie like me.

# sudo pacman -S grub2
# sudo grub-install --no-floppy /dev/sda

Now, after booting up its to no surprise that something is not working and here is the failed output lines after selecting Archlinux from the grub menu( It does say grub 1.98 now)

Waiting 10 seconds for device /dev/sda1...
EXT4-fs (sda1) mounted filesystem without journal. opts: (null)
Error: Root device mounted Successfully, but /sbin/init/ does not exist.
Bailing out, you are on your own. Good Luck.
/bin/sh: cant acces tty: job control turned off

Could somebody please tell me what I did wrong. I'm still not sure what just happened here.

Last edited by aluser (2011-02-10 00:48:13)

Offline

#2 2011-02-09 21:05:53

Knute
Member
From: Minot, ND
Registered: 2009-03-17
Posts: 604

Re: [SOLVED] Upgrading to grub2

What part of that article did you follow anyway?   There are so many different options in that article that it's hard to say just what exactly you did, or did not do.

So what does your grub.cfg file look like?


Knute

Offline

#3 2011-02-09 21:18:01

Beelzebud
Member
From: Illinois, U.S.
Registered: 2010-07-16
Posts: 154

Re: [SOLVED] Upgrading to grub2

Start off by posting the contents of your grub.cfg file.   

It's more than likely a simple fix, but people will need to see how your config looks.

Offline

#4 2011-02-09 22:00:38

aluser
Member
Registered: 2011-01-16
Posts: 119

Re: [SOLVED] Upgrading to grub2

Beelzebud wrote:

Start off by posting the contents of your grub.cfg file.   

It's more than likely a simple fix, but people will need to see how your config looks.

How can I do that? I'm using ubuntu live cd to post this.

Offline

#5 2011-02-09 22:02:37

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: [SOLVED] Upgrading to grub2

Mount the partion, copy/paste as normal.


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#6 2011-02-09 22:20:52

aluser
Member
Registered: 2011-01-16
Posts: 119

Re: [SOLVED] Upgrading to grub2

here it its:

# Config file for GRUB2 - The GNU GRand Unified Bootloader
# /boot/grub/grub.cfg

# DEVICE NAME CONVERSIONS
#
#  Linux           Grub
# -------------------------
#  /dev/fd0        (fd0)
#  /dev/sda        (hd0)
#  /dev/sdb2       (hd1,2)
#  /dev/sda3       (hd0,3)
#

# Timeout for menu
set timeout=5

# Set default boot entry as Entry 0
set default=0

# (0) Arch Linux
menuentry "Arch Linux" {
set root=(hd0,1)
linux /vmlinuz26 root=/dev/sda1 ro
initrd /kernel26.img
}

## (1) Windows
#menuentry "Windows" {
#set root=(hd0,3)
#chainloader +1
#}

Last edited by aluser (2011-02-09 22:28:22)

Offline

#7 2011-02-09 22:48:24

jonathan183
Member
Registered: 2008-06-11
Posts: 14

Re: [SOLVED] Upgrading to grub2

aluser wrote:

here it its:

# (0) Arch Linux
menuentry "Arch Linux" {
set root=(hd0,1)
linux /vmlinuz26 root=/dev/sda1 ro
initrd /kernel26.img
}

it looks as though you have a separate boot partition (from /kernel26 rather than /boot/kernel26) but you look to have root set to the same partition.

Last edited by jonathan183 (2011-02-09 22:49:29)

Offline

#8 2011-02-09 22:59:38

aluser
Member
Registered: 2011-01-16
Posts: 119

Re: [SOLVED] Upgrading to grub2

jonathan183 wrote:
aluser wrote:

here it its:

# (0) Arch Linux
menuentry "Arch Linux" {
set root=(hd0,1)
linux /vmlinuz26 root=/dev/sda1 ro
initrd /kernel26.img
}

it looks as though you have a separate boot partition (from /kernel26 rather than /boot/kernel26) but you look to have root set to the same partition.

So I add /boot right before /vmlinuz26 and /kernel26.img?

And yes I have a separate boot partition, This is the filesystem output of df-h not too long ago.

archuser@archws ~ % df -h                                                        
Filesystem            Size  Used Avail Use% Mounted on
udev                   10M  204K  9.9M   2% /dev
/dev/sda3             7.3G  6.0G  898M  88% /
shm                  1004M  1.2M 1003M   1% /dev/shm
/dev/sda1              99M   16M   79M  17% /boot
/dev/sda4             193G   18G  166G  10% /home

Last edited by aluser (2011-02-09 23:00:08)

Offline

#9 2011-02-09 23:02:47

v43
Member
Registered: 2011-02-03
Posts: 140

Re: [SOLVED] Upgrading to grub2

my grub.cfg file doesn't look like that anymore after the upgrade. did you edited your /etc/default/grub and run grub-mkconfig? i think that's the way it works now =/

anyway.. are you sure your root folder is in /dev/sda1?? that's the first partition of the disk. if you have different partitions for boot, swap, root and home, root will be more likely in sda3 or something!

EDIT: oops! i was late! smile

i think you should change the grub entry to linux /vmlinuz26 root=/dev/sda3 ro

Last edited by v43 (2011-02-09 23:04:17)

Offline

#10 2011-02-09 23:23:05

aluser
Member
Registered: 2011-01-16
Posts: 119

Re: [SOLVED] Upgrading to grub2

v43 wrote:

my grub.cfg file doesn't look like that anymore after the upgrade. did you edited your /etc/default/grub and run grub-mkconfig? i think that's the way it works now =/

anyway.. are you sure your root folder is in /dev/sda1?? that's the first partition of the disk. if you have different partitions for boot, swap, root and home, root will be more likely in sda3 or something!

EDIT: oops! i was late! smile

i think you should change the grub entry to linux /vmlinuz26 root=/dev/sda3 ro

You thought right. I guess I should have used # sudo grub-install --no-floppy /dev/sda1 instead of   # sudo grub-install --no-floppy /dev/sda alone.. but why was grub2 installed in sda3.. does taht mean sda=sda3?

Offline

#11 2011-02-09 23:52:53

v43
Member
Registered: 2011-02-03
Posts: 140

Re: [SOLVED] Upgrading to grub2

no!
you did right installing grub2 in the mbr of the disk (ie indicating sda alone), but that line tells the bootloader where the system is! where your root folder is smile

Offline

#12 2011-02-09 23:57:06

Knute
Member
From: Minot, ND
Registered: 2009-03-17
Posts: 604

Re: [SOLVED] Upgrading to grub2

aluser,

It appears that you are confused about a couple of things.

First of all, your /boot partition is NOT your root partition.   In your df post above it clearly shows that /dev/sda1 is /boot  and /dev/sda3 is your root partition, noted by the single forward slash (/).

When the grub.cfg file sees the root tag, it's asking where your root filesystem starts, not the boot partition.

Does that clarify things for you?


Knute

Offline

#13 2011-02-10 00:38:28

aluser
Member
Registered: 2011-01-16
Posts: 119

Re: [SOLVED] Upgrading to grub2

Knute wrote:

aluser,

It appears that you are confused about a couple of things.

First of all, your /boot partition is NOT your root partition.   In your df post above it clearly shows that /dev/sda1 is /boot  and /dev/sda3 is your root partition, noted by the single forward slash (/).

When the grub.cfg file sees the root tag, it's asking where your root filesystem starts, not the boot partition.

Does that clarify things for you?

I must admit I was very confused, but the line where it says root=/dev/sda1 ro. It was like that by default, I didn't change it from sda3 to sda1. I never said /boot was my root partition. I do appreciate though you trying to clarify this for me. I would just have never assumed I would have to modify any files after installing it.

Offline

#14 2011-02-10 00:55:05

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: [SOLVED] Upgrading to grub2

aluser wrote:

I would just have never assumed I would have to modify any files after installing it.

Now you know that after installing a package, sometimes you have to configure it to work right.

Grub2 does have certain scripts to autodetect and set up your configs for you. These scripts take away control from the user and are not run by default on install.

edit: nvm, it does, look at /boot/grub/grub.cfg.example

Last edited by fsckd (2011-02-10 00:57:25)


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

Board footer

Powered by FluxBB