Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am trying to boot from 3.11.1 kernel image on my system having Ubuntu 12.04 (kernel 3.2.0-53)

I used make defconfig and then compiled, placed the image in /boot, updated GRUB, and then rebooted.

On rebooting, I am getting the following messages :

EXT4-fs (sda1) : couldnt mount as ext3 due to feature incompatibilities
EXT4-fs (sda1) : couldnt mount as ext2 due to feature incompatibilities
init : unable to create device: /dev/kmsg
Root filesystem check failed

What went wrong?

If the kernel knows the filesystem is ext4 which I think it does because of the EXT4-fs (sda1), why is it being mounted as ext3/2 ?


/etc/fstab :

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
# / was on /dev/sda1 during installation
UUID=7be51edc-99ae-4e6e-b863-2bef9e4adb22 /               ext4    errors=remount-ro 0       1
# /home was on /dev/sda4 during installation
UUID=e4b936e5-e1c5-4146-9710-03b0d6dfdea2 /home           ext4    defaults        0       2
# swap was on /dev/sda3 during installation
UUID=10d012d1-bbba-43f4-8e8a-8aa493435acb none            swap    sw              0       0

# Move /tmp to RAM
tmpfs /tmp tmpfs defaults,noexec,nosuid 0 0

grub.cfg entry for image:

menuentry 'Ubuntu, with Linux 3.11.1' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    gfxmode $linux_gfx_mode
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos1)'
    search --no-floppy --fs-uuid --set=root 7be51edc-99ae-4e6e-b863-2bef9e4adb22
    linux   /boot/vmlinuz-3.11.1 root=/dev/sda1 ro   quiet splash $vt_handoff
}
menuentry 'Ubuntu, with Linux 3.11.1 (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos1)'
    search --no-floppy --fs-uuid --set=root 7be51edc-99ae-4e6e-b863-2bef9e4adb22
    echo    'Loading Linux 3.11.1 ...'
    linux   /boot/vmlinuz-3.11.1 root=/dev/sda1 ro recovery nomodeset 
}
share|improve this question
    
Paste your /etc/fstab, please. –  schaiba Sep 17 '13 at 14:29
    
@schaiba Updated –  AsheeshR Sep 17 '13 at 14:35
    
Also show us this kernel's menu entry in /boot/grub/grub.cfg please. –  terdon Sep 17 '13 at 14:43
    
@terdon Updated –  AsheeshR Sep 17 '13 at 14:49
    
Did you generate the grub.cfg using update-grub2 or manually? This is a complete shot in the dark but, does it work if you use set root='(/dev/sda,msdos1)' instead of set root='(hd0,msdos1)'? Does your /boot/grub/device.map correctly identify hd0? –  terdon Sep 17 '13 at 15:06

2 Answers 2

up vote 4 down vote accepted

You are trying to boot without an initramfs. You need to create one with update-initramfs -c -k 3.11.1 and then update-grub.

share|improve this answer
    
Thank you! The OS finally booted. I am still getting a few errors though. –  AsheeshR Sep 18 '13 at 17:06
    
@AsheeshR, you need to enable devtmpfs in your kernel configuration. –  psusi Sep 18 '13 at 21:00

It looks to me as if you've downloaded the linux kernel sources from kernel.org or somewhere and compiling it yourself, without taking advantage of any of your distribution's features (like packaging).

It's certainly possible to do this, but it's significantly more work than doing it the easy way.

Unfortunately, the ubuntu launchpad kernel-ppa doesn't seem to be maintained any more, otherwise i'd refer you to the answers at http://askubuntu.com/questions/47397/how-do-i-add-the-kernel-ppa.

Instead, I'll refer you to http://ubuntuhandbook.org/index.php/2013/09/kernel-3-11-1-released-install-upgrade-in-ubuntu-linux-mint/ which contains instructions for downloading and installing pre-compiled kernel 3.11.1 packages for Ubuntu. I run debian rather than ubuntu so I haven't tested this myself but the page claims that this will work for Ubuntu 12.04, 12.10 and 13.10, and the instructions seem correct.

Note that the kernel-ppa at ubuntu.com is an unofficial or semi-official repository. The domain is owned by Canonical, but unofficial kernel packages may not be supported. Neither would self-compiled kernels.

To summarize:

ARCH=$(dpkg --print-architecture)
wget "http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.11.1-saucy/linux-headers-3.11.1-031101-generic_3.11.1-031101.201309141102_$ARCH.deb"

wget "http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.11.1-saucy/linux-headers-3.11.1-031101_3.11.1-031101.201309141102_all.deb"

wget "http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.11.1-saucy/linux-image-3.11.1-031101-generic_3.11.1-031101.201309141102_$ARCH.deb"

sudo dpkg -iBE linux-headers-3.11.1*.deb linux-image-3.11.1*.deb

If you prefer to compile your own kernel rather than download a pre-compiled package, I strongly suggest you search for the ubuntu source packages for 3.11.1, unpack the sources with dpkg-source, install the build-dependencies, make whatever kernel config tweaks you need, and build them your own packages with dpkg-builpackage or similar.

Just as with other software, a kernel compiled into packages will likely cause you far less trouble and grief than non-packaged...it's almost always better to install a package than make && make install, and even when you want to build from source it's better to compile the packaged source.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.