You are not logged in.

#1 2014-03-08 17:41:51

bbarcher
Member
From: Poland
Registered: 2014-02-27
Posts: 174
Website

grub-mkconfig doesn't detect kernel image mkinitcpio fine

Update:
I'm trying to create a fresh grub.cfg for my old system. It seems the created grub.cfg is 'poluted' by entries that were only present on my old install. I don't know how to address it though.

os-prober installed
Separate partitions for /boot and /var.

sda, a SSD
MBR, no LVM (no lvm in the active mkinitcpio.cfg line)
BIOS system
Dual boot (windows 7 first)

Partition setup story:
1. clonezilla: restoredisk, image made from HDD with only Windows 7 installed and no linux history (so no lvm residues); most probably MBR
2. sda7 ext4 created for arch to be restored from an `rsync -ax` backup; `rsync -ax` used
3. attempts to reinstall grub, pacman -S linux linux-headers, mkinitcpio -p linux . . .

I've switched to a separate /boot partition the wrong way (the old /boot is lost, let's forget about it) and I'm trying to rebuild it now. I did something weird and my system does boot but only up to just before gdm kicks in. I can [Alt+F2] to get to command line so I do everything from there.

When I do

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

it all goes without errors, but only my system on sda2 and another one on external sdb get detected (and both boot fine afterwards!)
Despite my arch install not being detected (at least the dynamic return of the command doesn't list it as detected) entries regarding my arch install can be found in grub.cfg afterwards and it's listed in the grub menu(!):

### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_archlinux ###

menuentry "Arch Linux pkg-linux kernel" --class arch-linux --class arch --class gnu-linux --class gnu --class os {
    if [ x$feature_all_video_module = xy ]; then
        insmod all_video
    fi
    set gfxpayload=keep
    insmod ext2
    if [ x$feature_platform_search_hint = xy ]; then
        search --no-floppy --fs-uuid  --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5  45b7acb0-1860-45a1-96ae-882010c38129
    else
        search --no-floppy --fs-uuid  --set=root 45b7acb0-1860-45a1-96ae-882010c38129
    fi
    echo 'Loading Arch Linux pkg-linux kernel ...'
    linux /vmlinuz-linux root=UUID=e4b15e16-e224-4284-9f00-141885ad8620 rw  ipv6.disable=1
    echo 'Loading Arch Linux pkg-linux kernel initramfs ...'
    initrd /initramfs-linux.img
.
.
.
### END /etc/grub.d/10_archlinux ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-e4b15e16-e224-4284-9f00-141885ad8620' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_msdos 
	insmod ext2
	set root='hd0,msdos5'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5  45b7acb0-1860-45a1-96ae-882010c38129
	else
	  search --no-floppy --fs-uuid --set=root 45b7acb0-1860-45a1-96ae-882010c38129
	fi
	echo	'Loading Linux linux ...'
	linux	/vmlinuz-linux root=UUID=e4b15e16-e224-4284-9f00-141885ad8620 rw  ipv6.disable=1
	echo	'Loading initial ramdisk ...'
	initrd	/initramfs-linux.img
}

What I have already tried:
0. Right after I boot I >always< verify that my separate partitions are mounted (`lsblk`)
1. Reinstall using

pacman -S linux linux-headers

then proceed with mkinitcpio, grub-install (no errors up to this point) and grub-mkconfig
1a. Same but after deletion of all contents of /boot
2. Manually specify kernel for mkinitcpio

mkinitcpio -g /boot/linux.img -k 3.13.5-1-ARCH

(based on the contents of /usr/lib/modules)

The contents of /usr/lib/modules:

3.13.5-1-ARCH
extramodules-3.13-ARCH/
ls -l /boot
grub/
initramfs-linux-fallback.img
initramfs-linux.img
linux.img
vmlinuz-linux
# 
# /etc/fstab: static file system information
#
# <file system>	<dir>	<type>	<options>	<dump>	<pass>
# two lines below - old entry from my single-boot installation
# /dev/sda2
# UUID=a4d4efe1-d07d-4531-9300-5e7362e68e6c	/         	ext4      	rw,relatime,data=ordered	0 1

# /dev/sda7 UUID=e4b15e16-e224-4284-9f00-141885ad8620
LABEL=oRoot         	/         	ext4      	rw,relatime,data=ordered	0 1

# /dev/sda5 UUID=45b7acb0-1860-45a1-96ae-882010c38129
LABEL=oboot         	/boot     	ext4      	rw,relatime,data=ordered	0 2

# /dev/sda6 UUID=95ee952a-c254-424c-be0f-766d7f61301b
LABEL=ovar          	/var      	ext4      	rw,relatime,data=ordered	0 2

# LABEL=HIT_160 /mnt/HIT_160 auto nosuid,nodev,nofail,x-gvfs-show 0 0
# LABEL=HIT_262 /mnt/HIT_262 auto nosuid,nodev,nofail,x-gvfs-show 0 0

Recent grub.cfg
https://onedrive.live.com/redir?resid=6 … der%2c.cfg




scrapnotes
related?
https://wiki.archlinux.org/index.php/Ta … lling_GRUB
boot-repair : "Please enable a repository containing the [grub2] packages in the software sources of Arch:linux (sdb7). Then try again."
reinstall grub using arch live media (with chroot) : https://bbs.archlinux.org/viewtopic.php … 0#p1359360
lvm error : enable the lvmetad service https://bbs.archlinux.org/viewtopic.php?id=174996

https://bbs.archlinux.org/viewtopic.php?id=158725


marked as solved but useless : https://bbs.archlinux.org/viewtopic.php?id=159415

Last edited by bbarcher (2014-03-09 01:16:38)


Put up or shut up. 
--Austin Meyer, the lead developer of X-Plane
[ url=http://... ]  Text  [ /url ]

Offline

#2 2014-03-08 23:42:57

bbarcher
Member
From: Poland
Registered: 2014-02-27
Posts: 174
Website

Re: grub-mkconfig doesn't detect kernel image mkinitcpio fine

I was able to fully boot by editing a grub line:
old: linux     /vmlinuz-linux root=UUID=e4b15e16-e224-4284-9f00-141885ad8620 rw  ipv6.disable=1
new: linux    /vmlinuz-linux root=LABEL=oRoot rw  ipv6.disable=1

`oRoot` is my unique label for my root partition.

But why grub-mkconfig etc. didn't update the grub config properly and why this all happened? How do I clean up this mess? Obviously grub-mkconfig etc. won't work for me in the future and I'll be sitting on a mine.

Last edited by bbarcher (2014-03-09 01:16:01)


Put up or shut up. 
--Austin Meyer, the lead developer of X-Plane
[ url=http://... ]  Text  [ /url ]

Offline

#3 2014-03-09 04:40:46

henk
Member
From: Weert, Netherlands
Registered: 2013-01-01
Posts: 334

Re: grub-mkconfig doesn't detect kernel image mkinitcpio fine

This probably:

    search --no-floppy --fs-uuid  --set=root 45b7acb0-1860-45a1-96ae-882010c38129
    fi
    echo 'Loading Arch Linux pkg-linux kernel ...'
    linux /vmlinuz-linux root=UUID=e4b15e16-e224-4284-9f00-141885ad8620 rw  ipv6.disable=1

your UUID's don't match. The first one is your boot partition.

Offline

#4 2014-03-09 09:36:26

bbarcher
Member
From: Poland
Registered: 2014-02-27
Posts: 174
Website

Re: grub-mkconfig doesn't detect kernel image mkinitcpio fine

Yes, I know. At least this is what I think I described in post #2. But why grub.cfg keeps containing (and sticks to them) entries from my old system, even after >complete removal of /boot and re-installation of grub< ?


Put up or shut up. 
--Austin Meyer, the lead developer of X-Plane
[ url=http://... ]  Text  [ /url ]

Offline

Board footer

Powered by FluxBB