You are not logged in.

#1 2012-10-14 23:39:04

johnnymike
Member
Registered: 2012-10-14
Posts: 12

New Install Won't boot after GRUB

I have been using ArchBang for the past year and a half so I finally thought that I knew enough about Linux to try installing a true Arch Linux system. 

I followed the beginner instructions carefully and was able to successfully install my system (or at least I thought) and GRUB.  I am currently running my system on a Dell inspiron with two separate hard drives.  The primary drive is the one I am trying to install Arch on while I have Windows 7 installed on the second drive.

The drive I installed Arch on is /dev/sde.  I think that I successfully installed GRUB given that when I boot my computer it goes into GRUB and shows both my Arch Linux install and my Windows 7 system and when I select Windows 7 in GRUB it successfully boots.

But when I selected my Arch install in GRUB the system does not boot.  It just shows:

/dev/sda1: clean, 31087/3751936 files, 478966/15000685 blocks

and then I am left with a blinking cursor and after a few minutes I get:

Welcome to emergency mode. Use "systemctl default" or ^D to enter default mode.
Give root password for maintance:

Anyone one how I fix this?  Do I need to reinstall?  As I said before I didn't receive any errors during the install and GRUB seems to be working correctly. Please remember that I am a newbie but please help!

Offline

#2 2012-10-14 23:49:34

alexanderthegre
Member
Registered: 2012-07-29
Posts: 66

Re: New Install Won't boot after GRUB

What happens when you hit <ctrl>-d ?

Offline

#3 2012-10-15 00:01:32

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 13,532
Website

Re: New Install Won't boot after GRUB

No you don't need to reinstall, you do need to fix your grub configuration though.  It sounds like it is not properly pointing to the root partition.

Post your grub config and your partitioning scheme.


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Offline

#4 2012-10-15 00:32:43

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: New Install Won't boot after GRUB

Are you using /dev/sdeX for your bootloader?  With two disks, you are better off using UUIDs or LABELs.  I personally use UUIDs, but also label all my partitions so that I can have a human readable form if I need to boot from something like the UEFI shell.

Offline

#5 2012-10-15 01:41:21

johnnymike
Member
Registered: 2012-10-14
Posts: 12

Re: New Install Won't boot after GRUB

Trilby wrote:

No you don't need to reinstall, you do need to fix your grub configuration though.  It sounds like it is not properly pointing to the root partition.

Post your grub config and your partitioning scheme.


Partition Scheme from lsblk output:

Name         MAJ:MIN        RM        SIZE        RO        TYPE        MOUNTPOINT
sda             8:0                  0           931G       0            disk       
  sda1         8:1                  0           57G         0            disk           /
  sda2         8:2                  0           7G           0            disk
  sda3         8:3                  0           866G       0            disk
sdb             8:16                0           111G        0            disk
  sdb 1        8:17                0           111G        0            disk
sr0             11:0                 1           1024M     0            disk

I don't now if this output of the partition table is what you want given that the lsblk is the only command I am familiar with.   The sdb disk is where the windows install is.


Here is the /boot/grub/grub.cfg file:

### BEGIN /etc/grub.d/00_header ###
insmod part_gpt
insmod part_msdos
if [ -s $prefix/grubenv ]; then
   load_env
fi
set default="0"

if [ x"${feature_menuentry_id}" = xy ]; then
   menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
   set saved_entry="${prev_saved_entry}"
   save_env saved_entry
   set prev_saved_entry=
   save_env prev_saved_entry
   set boot_once=true
fi

function savedefault {
   if [ -z "${boot-once}" ]; then
      saved_entry="${chosen}"
      saved_env saved_entry
   fi
}

function load_video {
   if [ x$feature_all_video_module = xy ]; then
      insmod all_video
   else
      insmod efi_gop
      insmod efi_uga
      insmod ieee1275_fb
      insmod vbe
      insmod vga
      insmod video_bochs
      insmod video_cirrus
   fi
}

if [ x$feature_default_font_path = xy ]; then
      font=unicode
else
insmod part_msdos
insmod ext2
set root='hd4,msdos1'
if [x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd4,msdos1 --hint-efi=hd4,msdos1 --hint-baremetal=ahci4, msdos1 9fd0e01-89b1-494c-908f-e89db34d80e0
else
      search --no-floppy --fs-uuid --set=root 9fd0e01-89b1-494c-908f-e89db34d80e0
fi
          font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
      set gfxmode=auto
      load_video
      insmod gfxterm
      set locale_dir=$prefix/locale
      set lang=en_US
      insmod gettext
fi
terminal_input console
terminal_output gfxterm
set timeout=5
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Arch GNU/Linux, with Linux core repo kernel' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-core repo kernel-true-9fd0e01-89b1-494c-908f-e89db34d80e0' {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_msdos
        insmod ext2
        set root='hd4,msdos1'
        if [ x$feature_platform_search_hint = xy ]; then
            search --no-floppy --fs-uuid --set=root --hint-bios=hd4,msdos1 --hint-efi=hd4,msdos1 --hint-baremetal=ahci4, msdos1 9fd0e01-89b1-494c-908f-e89db34d80e0
        else
             search --no-floppy --fs-uuid --set=root 9fd0e01-89b1-494c-908f-e89db34d80e0
        fi
        echo 'Loading Linux core repo kernel ...'
        linux /boot/vmlinux-linux root=UUID=9fd0e01-89b1-494c-908f-e89db34d80e0 ro  quiet
        echo 'Loading initial ramdisk ...'
        initrd /boot/initramfs-linux-fallback.img
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_memtext86+ ###
### END /etc/grub.d/20_memtext86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows 7 (loader) (on /dev/sdf1)' --class windows --class os $menuentry_id_option 'osprober-chain-44F084A6F0849FB2' {
       insmod part_msdos
       insmod ntfs
       set root="hd5,msdos1'
       if [ x$feature_platform_search_hint = xy ]; then
           search --no-floppy --fs-uuid --set=root --hint-bios=hd4,msdos1 --hint-efi=hd4,msdos1 --hint-baremetal=ahci4, msdos1 44F084A6F0849FB2
      else
           search --no-floppy --fs-uuid --set=root 44F084A6F0849FB2
      fi
      chainloader +1
}
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This files provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f ${config_directory}/custom.cfg ]; then
      source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
      source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###

Last edited by johnnymike (2012-10-15 01:52:09)

Offline

#6 2012-10-15 01:45:19

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 13,532
Website

Re: New Install Won't boot after GRUB

Please edit your post to used code tags like

this

for all the code.

Also, I was asking about your partitioning scheme, not what was actually mounted at the time you ran the command.  In other words, what are the intended mount points, or what partitions have you selected for what purposes (boot, root, home, swap, others such as var/usr ...)

Something is odd about your disk numbers too.  How many disks do you have?  I assumed the sde in your first post was a typo, but your grub config refers to an sde and sdf - but your block device listing only shows sda and sdb.

Last edited by Trilby (2012-10-15 01:47:51)


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Offline

#7 2012-10-15 01:57:56

johnnymike
Member
Registered: 2012-10-14
Posts: 12

Re: New Install Won't boot after GRUB

Trilby wrote:

Please edit your post to used code tags like

this

for all the code.

Also, I was asking about your partitioning scheme, not what was actually mounted at the time you ran the command.  In other words, what are the intended mount points, or what partitions have you selected for what purposes (boot, root, home, swap, others such as var/usr ...)

Something is odd about your disk numbers too.  How many disks do you have?  I assumed the sde in your first post was a typo, but your grub config refers to an sde and sdf - but your block device listing only shows sda and sdb.


Sorry about not properly posting the code.

Anyways, when I was partitioning using cfdisk during the install, the disk was labeled /dev/sde and the root, swap, and home partitions where labeled as sde1, sde2, and sde3 respectively.  This was the same labeling I got after writing the partition table to the disk and running the lsblk command as per the Arch Linux install instructions.

Also, I thought the same thing about the disk numbers as well.  When I was running ArchBang I was using an older version of grub with a /boot/grub/menu.lst file and in that file my Linux drive was hd0 and my windows drive was hd1.  Now for some reason they are hd4 and hd5.

Offline

#8 2012-10-15 03:37:47

alexanderthegre
Member
Registered: 2012-07-29
Posts: 66

Re: New Install Won't boot after GRUB

This really doesn't look like a grub issue to me; given that it talks about systemctl, you probably just installed today and it asks for the root password (IIRC bootloaders can't do this), it seems to be a problem with systemd...
As it asks for the root password, what sort of prompt do you get if you give it?

Offline

#9 2012-10-15 03:41:42

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 13,532
Website

Re: New Install Won't boot after GRUB

Alexander, this is the expected result if there is no initramfs or the root partition can't be mounted.  Hence my suspicion that there is an error in the grub configs, but as I don't use grub(2) I can barely make heads or tales of those configs.

Edit: speaking of which, you only have one boot entry for arch, and it uses the fallback initramfs.  Is there a reason for this?

Last edited by Trilby (2012-10-15 03:44:04)


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Offline

#10 2012-10-15 03:46:36

johnnymike
Member
Registered: 2012-10-14
Posts: 12

Re: New Install Won't boot after GRUB

alexanderthegre wrote:

This really doesn't look like a grub issue to me; given that it talks about systemctl, you probably just installed today and it asks for the root password (IIRC bootloaders can't do this), it seems to be a problem with systemd...
As it asks for the root password, what sort of prompt do you get if you give it?


I don't think it's a GRUB issue either as GRUB seems to be working fine.  I did just install the system today and I am in the point in the Beginner's install guide after you update the system and reboot for the first time.  This problem is occuring after the first reboot of the freshly installed system.  If you hit ^D it just gives you a blinking cursor.  If you give the root password I am able to get root access, i.e. I get the [root@ArchLinuxPC~]# prompt where ArchLinuxPC is the hostname of my system.

I just assumed that when I rebooted that it would do something similar to the boot page I would get for my ArchBang system where it would boot the init Linux 2.88 and start and load all of the daemons and modules but then instead of opening a window manager like openbox (given that I haven't yet installed a window manager) that I would then get my user prompt for the user I created during the install.

Offline

#11 2012-10-15 03:49:37

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 13,532
Website

Re: New Install Won't boot after GRUB

Johnny, it sounds like a bad initramfs.  I suspect the update included a kernel update which in turned rebuilt the initramfs, you should rebuild them again with `mkinitcpio -p linux`.

Edit: you will not likely be able to do this from the recovery shell.  You can either manually mount your root partition in the recovery shell then rebuild the initramfs, or you can use the live media and chroot.  The latter is a few more steps, but may be easier as there is a well written wiki page on exactly how to do it.

Last edited by Trilby (2012-10-15 03:53:11)


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Offline

#12 2012-10-15 03:49:48

johnnymike
Member
Registered: 2012-10-14
Posts: 12

Re: New Install Won't boot after GRUB

Trilby wrote:

Alexander, this is the expected result if there is no initramfs or the root partition can't be mounted.  Hence my suspicion that there is an error in the grub configs, but as I don't use grub(2) I can barely make heads or tales of those configs.

Edit: speaking of which, you only have one boot entry for arch, and it uses the fallback initramfs.  Is there a reason for this?


I am a complete newbie to installing a more advanced Linux system like Arch so I just followed the GRUB installation wiki and ran the command

grub-mkconfig -o /boot/grub/grub.cfg

to automatically generate my GRUB config as per the instructions in the installation guide.

Offline

#13 2012-10-15 03:53:32

johnnymike
Member
Registered: 2012-10-14
Posts: 12

Re: New Install Won't boot after GRUB

I forgot to mention that I ran the command

pacman -S os-prober

before creating my GRUB config file. Hence, why my grub.cfg file looks semi-sophisticated for a newbie and why it properly accounts for my windows install.

Offline

#14 2012-10-15 03:55:58

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: New Install Won't boot after GRUB

Well, since grub2 configures the config file for you, it actually just looks like you have os-prober installed.  Maybe it would be better to post /etc/default/grub as that is where the user configurations are stored.

Offline

#15 2012-10-15 04:00:01

johnnymike
Member
Registered: 2012-10-14
Posts: 12

Re: New Install Won't boot after GRUB

Trilby wrote:

Johnny, it sounds like a bad initramfs.  I suspect the update included a kernel update which in turned rebuilt the initramfs, you should rebuild them again with `mkinitcpio -p linux`.

Edit: you will not likely be able to do this from the recovery shell.  You can either manually mount your root partition in the recovery shell then rebuild the initramfs, or you can use the live media and chroot.  The latter is a few more steps, but may be easier as there is a well written wiki page on exactly how to do it.


Triby, I tried running the mkinitcpio command like you said within the recovery shell and it seemed to go through successfully BUT I just rebooted and it is still doing the same thing.

Now you are saying that in the live media method what I would have to do it boot from the live cd, and then run

arch-chroot /mnt

to chroot and then try running the command you suggested?

Offline

#16 2012-10-15 04:17:54

johnnymike
Member
Registered: 2012-10-14
Posts: 12

Re: New Install Won't boot after GRUB

WonderWoofy wrote:

Well, since grub2 configures the config file for you, it actually just looks like you have os-prober installed.  Maybe it would be better to post /etc/default/grub as that is where the user configurations are stored.


Contents of /etc/default/grub

GRUB_DEFAULT=0
GRUB_DEFAULT=5
GRUB_DISTRIBUTER="Arch"
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_CMDLINE_LINUX=""

GRUB_PRELOAD_MODULES="part_gpt part_msdos"

#GRUB_HIDDEN_TIMEOUT=5
#GRUB_HIDDEN_TIMEOUT_QUIET=true

GRUB_TERMINAL_INPUT=console

#GRUB_TERMINAL_OUTPUT=console

GRUB_GFXMODE=auto

GRUB_GFXPAYLOAD_LINUX=keep

#GRUB-DISABLE_LINUX_UUID=true

GRUB_DISABLE_RECOVERY=true

#GRUB_COLOR_NORMAL="light-blue/black"
#GRUB_COLOR_HIGHLIGHT="light-cyan/blue"

#GRUB_BACKGROUND="/path/to/wallpaper"
#GRUB_THEME="/path/to/gfxtheme"

#GRUB_INIT_TUNE="480 440 1"

#GRUB_SAVEDEFAULT="true"

Offline

#17 2012-10-15 04:19:09

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: New Install Won't boot after GRUB

Wow, that is the most default config since I last used grub2.  I guess there is nothing to see here... sorry.

Offline

#18 2012-10-15 13:43:18

piie
Member
Registered: 2007-02-20
Posts: 32

Re: New Install Won't boot after GRUB

Had same problem here... This brought me a bit further:

- log in with your root password
- # mount -o rw,remount /
- edit /etc/fstab for / filesystem to this:
/dev/sda1 / auto defaults,nofail 0 0

Now login prompt is there, but / fs is still mounted "ro" by default.

BTW: I think switching to systemd was a big error because IMHO it breaks archlinux's "kiss" philosophy

Offline

#19 2012-10-15 17:40:59

johnnymike
Member
Registered: 2012-10-14
Posts: 12

Re: New Install Won't boot after GRUB

I think that I might have figured it out.  I remounted my / filesystem and opened the fstab file to look at it.  In the file my partitions where labeled sde1, sde2, and sde3 not sda1, sda2, sda3 that the current lsblk output is showing.  This made sense though given that as I said before when I was doing the install I was using sdeX throughout. 

Anyways, I went into my fstab file and manually changed the partition labels to sda1, sda2, sda3.  I then wrote the file, exited, and rebooted my system and now it shows the line

/dev/sda1: clean, 31087/3751936 files, 478966/15000685 blocks

as before but the screen then blinks and then I get the usual thing I would expect from my experience with ArchBang, i.e.

Arch Linux 3.5.6.1-ARCH (tty1)

ArchLinuxPC login: _

and from this I can do things like login into to the user I created during the install and connect to wifi.

Does this mean that modifying the fstab fixed the problem?  As I said before, I have never installed a true Arch Linux system before so I don't know what I is actually supposed to happen after I exit the chroot after configuring the system and then reboot for the first time during the install process.  Can someone please respond as to whether I can now continue with the remainder of the install process or let me know how I can check whether or not the system, at this point at least, is good to go?

Offline

#20 2012-10-15 17:46:03

johnnymike
Member
Registered: 2012-10-14
Posts: 12

Re: New Install Won't boot after GRUB

Well one thing that may be an indicator that something is still wrong is that I'm not able to use the sudo command.  When I try to use it like I did when using ArchBang I get:

~bash: sudo: command not found

Offline

#21 2012-10-15 18:03:12

akhsig
Member
Registered: 2012-10-15
Posts: 3

Re: New Install Won't boot after GRUB

You may just need to install the sudo package from the official repo.

pacman -S sudo

Offline

Board footer

Powered by FluxBB