LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux Deepin
User Name
Password
Linux Deepin This forum is for the discussion of Linux Deepin.

Notices


Reply
  Search this Thread
Old 03-07-2018, 09:28 AM   #1
ravione
LQ Newbie
 
Registered: Mar 2018
Posts: 1

Rep: Reputation: Disabled
Question EFISTUB boot failure, Dell Latitude 6220


Hi,

I'm new Linux user and I'm searching for help.

I'm trying to speed up booting time on my Dell Latitude 6220. I've found out that I can bypass grub bootloader using the kernels built in efistub loader.

I've found tutorial for ubuntu here but modified it to work on deepin with mixed results.

This is what I have done:

1. Created 3 partitions using gparted from live cd.
sda1 - efi (500mb)
sda2 - /
sda3 - home

2. Installed deepin on sda2 and pointed the efi and home partition. (system boots but using grub)

3. Created /etc/kernel/postinst.d/zz-update-efistub with the following contents:

#!/bin/sh
cp /vmlinuz /initrd.img /boot/efi/EFI/deep/

4. Then made executable with parameters:

sudo chmod +x /etc/kernel/postinst.d/zz-update-efistub
sudo /etc/kernel/postinst.d/zz-update-efistub

and i run it.

5. Added boot entry:

sudo efibootmgr -c -d /dev/sda -p 1 -L "Deepin (efistub)" -l /EFI/deep/vmlinuz -u "root=/dev/sda2 rw initrd=/EFI/deep/initrd.img quiet splash"

And now the pc boots from the kernel but gives an error: "vfs: unable to mount root fs on unknown block"

As I understand kernel cannot mount the root partition or as I found on the net it cannot find the initrd.img to point it to the root.

I've heard that I can hardcode the root path into the kernel but that's above my abilities.

And to my question.. Does anybody have an idea how to successfuly boot the deepin using efistub loader?

Last edited by ravione; 03-09-2018 at 02:43 AM.
 
Old 03-11-2018, 04:39 AM   #2
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
Hello, welcome to LQ.

Instructions below are valid for any Linux distribution, I think.

You need to rebuild your kernel with specific configure options:
CONFIG_BLK_DEV_INITRD=y
To be able to use an initrd
CONFIG_INITRAMFS_SOURCE=<path to your initrd>
The initrd should be a cpio archive, i.e. not gzipped (making the kernel will compress it).
CONFIG_EFI_STUB=y
This kernel feature allows a bzImage to be loaded directly by EFI firmware without the use of an external boot loader.
CONFIG_CMDLINE_BOOL=y
Allow for specifying boot arguments to the kernel at build time.
CONFIG_CMDLINE=<your boot command line>
Enter arguments here that should be compiled into the kernel image and used at boot time.
This is should be the same command line as if you used a boot manager, minus the indication of the kernel and the initrd but indicating of course the root device.

So basically that makes a bundle of the kernel including the EFI loader and the initrd, with a built-in command line.

EDIT: I almost forgot: you will need to have the kernel renamed BOOTX64.EFI and located in /EFI/BOOT/ in the iso so that the EFI firmware finds it.

Only caveat: you won't be able to edit the command line at boot time. Changing it will need to rebuild the kernel.


Best regards,

Last edited by Didier Spaier; 03-11-2018 at 04:59 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Dell Latitude D505 won't boot Ztcoracat Linux - Hardware 15 03-08-2015 04:28 PM
[SOLVED] i can install linux on dell latitude d610 but can not boot. Stranger420 Linux - Laptop and Netbook 28 08-20-2011 09:06 AM
Stupid Dell Latitude won't boot from usb. toledowizard Linux - Laptop and Netbook 2 09-15-2009 10:15 AM
RH 8.0 on Dell Latitude D600 freezed on boot lark Linux - Laptop and Netbook 5 12-01-2004 01:06 PM
RH 8.0 on Dell Latitude D600 freezed on boot lark Red Hat 1 11-20-2003 07:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux Deepin

All times are GMT -5. The time now is 02:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration