You are not logged in.

#1 2011-01-16 20:00:25

rubenvb
Member
Registered: 2011-01-14
Posts: 99

GRUB2: resume from disk and "update-grub"

I know that adding a

> resume /dev/disk/by-uuid/somecrazyuuid

to the boot line of the grub/menu.lst, but GRUB2 doesn't have this and relies on fancy scripts and a "/etc/default/grub" file for easy option editing (which is better IMHO).

How should I do this for GRUB2?

And another thing (maybe just a small nuicance). Why is there no update-grub for GRUB2 in Arch? I thought it was "part of the package", if you know what I mean.

Thanks!

Last edited by rubenvb (2011-01-22 09:27:48)

Offline

#2 2011-01-22 01:32:55

empthollow
Member
Registered: 2009-09-26
Posts: 168

Re: GRUB2: resume from disk and "update-grub"

I have never used resume grub.  All custom modifications can be made in /etc/grub.d/40_custom  There is a slight syntax difference that can be found on the grub2 archwiki.  As far, as update-grub goes, the 'update-grub' command is an ubuntu command but what is part of the package is 'grub-mkconfig'.  To create a grub.cfg file run this:

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

This will use the files in /etc/grub.d to create a grub.cfg file.


--empthollow
Check out my Arch based live distro http://fluxcapacity.99k.org

Offline

#3 2011-01-22 05:22:14

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: GRUB2: resume from disk and "update-grub"

empthollow wrote:

As far, as update-grub goes, the 'update-grub' command is an ubuntu command but what is part of the package is 'grub-mkconfig'.  To create a grub.cfg file run this:

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

This will use the files in /etc/grub.d to create a grub.cfg file.

Yup; I use BURG (for now; should just switch to grub2, since it's progressing further) so I just use a 'burgup' alias. 

I'm afraid I can't say for sure how grub2 handles suspend to disk.  Have you tried it yet?  I might be wrong, but a test-run of suspend-to-disk shouldn't hurt once.

Offline

#4 2011-01-22 06:21:19

Beelzebud
Member
From: Illinois, U.S.
Registered: 2010-07-16
Posts: 154

Re: GRUB2: resume from disk and "update-grub"

The command for "update-grub" comes from Ubuntu, and is just an alias.   If you'd like functionality like that in Arch, just add this to your ~/.bashrc file:

alias update-grub='sudo update-grub='sudo grub-mkconfig -o /boot/grub/grub.cfg'

Offline

#5 2011-02-26 01:54:06

ioos
Member
Registered: 2011-01-25
Posts: 125

Re: GRUB2: resume from disk and "update-grub"

Beelzebud, I just found this through a search. Very helpful. Thank you.

Offline

#6 2012-08-25 08:46:11

rhoit
Member
From: 977
Registered: 2012-07-05
Posts: 62
Website

Re: GRUB2: resume from disk and "update-grub"

Beelzebud wrote:

The command for "update-grub" comes from Ubuntu, and is just an alias.   If you'd like functionality like that in Arch, just add this to your ~/.bashrc file:

alias update-grub='sudo update-grub='sudo grub-mkconfig -o /boot/grub/grub.cfg'

Its not solving the problem! "update-grub" it used to detect all the OS in all your partitions!


just found in wiki
I guess we need "os-prober"  https://www.archlinux.org/packages/?name=os-prober

Last edited by rhoit (2012-08-25 08:53:29)

Offline

#7 2012-08-25 11:53:10

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: GRUB2: resume from disk and "update-grub"

Alias should probably be:

alias update-grub='grub-mkconfig -o /boot/grub/grub.cfg'

Stick it at the end of /etc/bash.bashrc, for system-wide availability, or, create a script in /bin:

# nano /bin/update-grub
#!/bin/sh
grub-mkconfig -o /boot/grub/grub.cfg

Set the executable bit:

# chmod +x /bin/update-grub

There. Problem solved. You are now using Ubuntu.


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#8 2012-08-25 12:52:12

oi_wtf
Member
From: /home/wtf
Registered: 2012-03-11
Posts: 191

Re: GRUB2: resume from disk and "update-grub"

rubenvb wrote:

I know that adding a

> resume /dev/disk/by-uuid/somecrazyuuid

to the boot line of the grub/menu.lst, but GRUB2 doesn't have this and relies on fancy scripts and a "/etc/default/grub" file for easy option editing (which is better IMHO).

How should I do this for GRUB2?

By adding that "resume=/dev/disk..." to GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub
and don't forget to regenerate your grub.cfg, of course...


Laptop:   Arch Linux (x86_64) and Win10 (x86_64);  Intel Core i7-3630QM @ 2.40GHz, 8 GiB RAM, NViDiA GeForce GT 650M w/ 2 GiB
Desktop: Arch Linux (x86_64) and Win10 (x86_64);  Intel Core i7-4771  @ 3.50GHz, 32 GiB RAM, AMD Radeon RX 480 w/ 8 GiB

Offline

#9 2012-08-27 05:32:24

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

Re: GRUB2: resume from disk and "update-grub"

If resume is still not working after adding the resume= stuff to the GRUB_CMDLINE_LINUX_DEFAULT, you may also need to add resume to the hooks in mkinicpio.  This was necessary for my Macbook, Thinkpad, and a ghetto HP desktop (all of the computers currently available to me).

Offline

Board footer

Powered by FluxBB