LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-07-2016, 05:26 AM   #1
Altoid
Member
 
Registered: Oct 2016
Location: Southern Hemisphere
Distribution: Devuan
Posts: 110

Rep: Reputation: Disabled
grub2 and DSDT runtime load question


Hello:

I've posted this question in a couple of other places but it seems no one wants to talk about it.

To the point:
In order to fix some ACPI issues in my setup (Sun Ultra 24 + Linux Mint 18 64bit) I've tried to load a custom dsdt file at run time.

As it was not working even though the modified dsdt file compiled with 0 errors, I tried loading the original (unmodified) one to see if it was some problem with grub2 loading of the file.

It did not work either.
It seems I may have a syntax problem. (?)

I have tried these two variants with the same result, a black screen with only Ctrl+Alt+Del as a solution:

1.
adding a kernel variable

Code:
acpi=/boot/dsdt.aml
Then

Code:
sudo update-grub2
which would declare it found the file and finish without issues.

2.
by means of a file in /etc/grub.d

Code:
#!/bin/sh -e

# Uncomment to load custom ACPI table
GRUB_CUSTOM_ACPI="/boot/dsdt.aml"

# DON'T MODIFY ANYTHING BELOW THIS LINE!

prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib

. /usr/share/grub/grub-mkconfig_lib
#. ${libdir}/grub/grub-mkconfig_lib

# Load custom ACPI table
if [ x${GRUB_CUSTOM_ACPI} != x ] && [ -f ${GRUB_CUSTOM_ACPI} ] \
        && is_path_readable_by_grub ${GRUB_CUSTOM_ACPI}; then
    echo "Found custom ACPI table: ${GRUB_CUSTOM_ACPI}" >&2
    prepare_grub_to_access_device `${grub_probe} --target=device ${GRUB_CUSTOM_ACPI}` | sed -e "s/^/  /"
    cat << EOF
acpi (\$root)`make_system_path_relative_to_its_root ${GRUB_CUSTOM_ACPI}`
EOF
fi
and making it executable.

Code:
chmod +x /etc/grub.d/01_acpi
which would declare it found the file and finish without issues.

Q:
Why isn't this working?
It seems that grub just stops as it starts.
I have tried to find a syntax problem but (to me) it looks OK.

Any ideas?

Thanks in advance.

Note to Admin:
Please move to another forum if it does not belong here.

Last edited by Altoid; 11-07-2016 at 05:55 AM. Reason: spelling/syntax
 
Old 11-08-2016, 12:17 AM   #2
Elizine
Member
 
Registered: Aug 2015
Posts: 54
Blog Entries: 1

Rep: Reputation: Disabled
grub2 and DSDT runtime load question

Here's a solution -

Code:
chmod +x /etc/grub.d/01_acpi
This will tell GRUB to include the DSDT into its core.img (change GRUB_CUSTOM_ACPI to reflect the path to your .aml file). Next you will need a new boot image. If you use GRUB run:

Code:
grub-mkconfig -o /boot/grub/grub.cfg
Lastly, recreate your initrd

Code:
mkinitcpio -p linux
and reboot. Done!
 
Old 11-09-2016, 11:52 AM   #3
Altoid
Member
 
Registered: Oct 2016
Location: Southern Hemisphere
Distribution: Devuan
Posts: 110

Original Poster
Rep: Reputation: Disabled
Hello:

Sorry for the delay in answering.

[QUOTE=Elizine;5628234]Here's a solution ...[/CODE]
I think this does not work with Mint 18 64bit.

This is what I am running:
Code:
~ $ uname -a
Linux 4.4.0-45-generic #66-Ubuntu SMP Wed Oct 19 14:12:37 UTC 2016 x86_64 GNU/Linux

This is what happens:
Code:
~ $ mkinitcpio -p linux
mkinitcpio: command not found
I don't see mkinitcpio anywhere in the file system.

Any ideas?

Thanks for your input.

A.

Last edited by Altoid; 11-09-2016 at 12:04 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Grub2 won't load Windows XP dhruvats Ubuntu 13 05-28-2013 11:42 AM
Grub2 failing to load xinquan Linux - General 10 06-12-2011 02:21 PM
[SOLVED] Grub2 won't load some OS's after expanding partitions slacker_et Linux - Virtualization and Cloud 12 04-04-2011 07:08 AM
GRUB2 takes a long time to load squirrel-the-tire Linux - Software 10 03-03-2010 04:47 PM
Custom DSDT won't load (works in ubuntu) samopal Debian 1 10-24-2007 07:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:05 AM.

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