You are not logged in.

#1 2013-05-28 04:32:50

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

[solved] /boot/grub/grub.cfg installed as /boot/grub/grub.cfg.pacnew

Hello there,

With the latest update of grub-common I got the following message:

( 3/15) upgrading grub-common                                                                               [################################################################] 100%
warning: /boot/grub/grub.cfg installed as /boot/grub/grub.cfg.pacnew

However, should I reflect the changes of grub.cfg.pacnew or simply ignore it because grub.cfg is generated automatically?

Last edited by orschiro (2013-05-29 05:08:19)

Offline

#2 2013-05-28 04:40:14

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

Re: [solved] /boot/grub/grub.cfg installed as /boot/grub/grub.cfg.pacnew

diff it and see.  But I think that since it is generated automagically, this is probably simply an example that is meant to be overwritten by the autogeneration tool.  Maybe it is just now included so that it can be tracked by pacman...

Offline

#3 2013-05-28 10:03:42

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: [solved] /boot/grub/grub.cfg installed as /boot/grub/grub.cfg.pacnew

Alright. So it should be sufficient to just regenerate grub.

Thanks!

Offline

#4 2013-05-28 11:21:46

woznme
Member
From: Gold Coast, AU
Registered: 2013-01-13
Posts: 22

Re: [solved] /boot/grub/grub.cfg installed as /boot/grub/grub.cfg.pacnew

I ignored it, and booted just fine. not saying that was the correct way to do it but viewing differences looked like i wouldn't have an issue. fingers were crossed while rebooting though.

Offline

#5 2013-05-28 11:31:34

rEnr3n
Member
Registered: 2012-07-25
Posts: 39

Re: [solved] /boot/grub/grub.cfg installed as /boot/grub/grub.cfg.pacnew

I took a reckless decision to use the new grub file. I viewed the diff and noticed the only difference was that there was a new partition and the UUID changed. I was really puzzled about it. Maybe my attached smartphone caused something. Glad I didn't remove the old file and I'm now back for a few minutes almost trying to pull my hair out.

Can you post your diff guys?

Offline

#6 2013-05-28 12:53:33

ozar
Member
From: USA
Registered: 2005-02-18
Posts: 1,686

Re: [solved] /boot/grub/grub.cfg installed as /boot/grub/grub.cfg.pacnew

This .pacnew file looks to be the equivalent of the grub.cfg.example file found in my /boot/grub folder.  Rather than fooling with either of them, regenerating the grub.cfg file and rebooting worked with no issues here.


oz

Offline

#7 2013-05-28 19:57:53

Lekensteyn
Member
From: Netherlands
Registered: 2012-06-19
Posts: 192
Website

Re: [solved] /boot/grub/grub.cfg installed as /boot/grub/grub.cfg.pacnew

rEnr3n, you should **not** replace your current grub.cfg with the one contained in the package. Instead, run grub-mkconfig -o /boot/grub/grub.cfg to generate a grub.cfg file tailored to your system. If you overwrote your grub.cfg with the "new" one, it is possible that your machine does not boot.

As why this file is still shipped... see the PKGBUILD:

	## install grub.cfg (needed so it doesn't get removed on upgrading because it was previously here)
	install -D -m0644 "${srcdir}/grub.cfg" "${pkgdir}/boot/grub/grub.cfg"

Offline

#8 2013-05-29 05:08:08

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: [solved] /boot/grub/grub.cfg installed as /boot/grub/grub.cfg.pacnew

Thanks Lekensteyn for the reason of shipping this file. I will mark the thread as solved.

Offline

#9 2013-05-30 16:30:20

omeringen
Member
Registered: 2012-05-28
Posts: 114

Re: [solved] /boot/grub/grub.cfg installed as /boot/grub/grub.cfg.pacnew

Hi,
Yeah i made a mistake and replaced pacnew file, as a matter of course i have got an error on boot action. I don't own another computer to prepare a live USB, luckily i realized that one of my old USB already include partedmagic. Replaced my old file, booted archlinux again and regenerated grub config file.

It's always good to rename your files(like grub.cfg.old) and keep one of them when you replace current ones with pacnew files.

Offline

#10 2013-05-30 21:30:31

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

Re: [solved] /boot/grub/grub.cfg installed as /boot/grub/grub.cfg.pacnew

omeringen wrote:

Hi,
Yeah i made a mistake and replaced pacnew file, as a matter of course i have got an error on boot action. I don't own another computer to prepare a live USB, luckily i realized that one of my old USB already include partedmagic. Replaced my old file, booted archlinux again and regenerated grub config file.

It's always good to rename your files(like grub.cfg.old) and keep one of them when you replace current ones with pacnew files.

It is indeed probably a good idea to keep your old configs until you know the new version works.  But a even better idea would proabbly be to not blindly move *.pacnew files into place without comparing them and giving serious thought about what it is you are doing.

Offline

#11 2013-06-01 02:34:19

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,130

Re: [solved] /boot/grub/grub.cfg installed as /boot/grub/grub.cfg.pacnew

Don't pacnew files only get created if a config file has been customised? So if there is a pacnew file, that typically means the configuration file has been customised (by you or by software). Which means the whole point is that it is almost never safe to replace the old file with the pacnew file rather than merging changes. (I say "safe" - often it won't prevent booting, of course. But it is likely to break something, possibly in some subtle way you won't discover until later. Though very possibly in some very unsubtle way you will discover quickly as when people moved /etc/passwd.pacnew to /etc/passwd and so on and then were surprised that their systems broke.)

Last edited by cfr (2013-06-01 02:36:02)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#12 2013-06-01 04:20:25

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

Re: [solved] /boot/grub/grub.cfg installed as /boot/grub/grub.cfg.pacnew

While ultimately it means that the file has been modified, what pacman is actually doing is comparing a checksum of the file listed in the backup array.  So yes cfr, it means that it is really not safe to simply overwrite the old with the new, and this is why pacman doens't do it on its own.  Hence I really don't understand why people simply do this anyway.  This is especially true for the example you gave with the "passwd" file (and also "shadow" and "group").  For your machine may boot after you overwrite it, but you will render yourself unable to log in.

Also if you cahged a config that is tracked in this way, it is likely that you use that software as well.  So again, I don't see how one might think that they should simply overwrite all that configuration work that they might have taken a decent amount of time to get right.  Though I guess in this case of the grub.cfg, the confusion might be attributed to the fact that grub2 automagically makes a crazy complex config for you.  So there is typically no hand editing of the file (except for you cfr, I know you hand edit your config).

Offline

#13 2013-06-20 14:32:41

Natanji
Member
Registered: 2009-09-22
Posts: 133

Re: [solved] /boot/grub/grub.cfg installed as /boot/grub/grub.cfg.pacnew

I just broke my system with this, so I think the package should *at least* post a notice to the user asking him to run "grub-mkconfig -o /boot/grub/grub.cfg" - or simply doing so post-installation, even. I know, my fault, but it's still really easy to overlook...

Last edited by Natanji (2013-06-20 14:33:01)

Offline

#14 2013-06-21 00:14:55

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,130

Re: [solved] /boot/grub/grub.cfg installed as /boot/grub/grub.cfg.pacnew

Natanji wrote:

I just broke my system with this, so I think the package should *at least* post a notice to the user asking him to run "grub-mkconfig -o /boot/grub/grub.cfg" - or simply doing so post-installation, even. I know, my fault, but it's still really easy to overlook...

Since automating it would make it virtually impossible to maintain a manually configured grub.cfg, I disagree. Arch does not do that stuff automatically. Even for those who do not hand edit the config file, it is likely to break things if people have more complex setups. (For example, in some cases, grub will not find an OS unless the partition is mounted and it might not be mounted.) Actually, not even Fedora does this automatically although I suspect that is considered a bug.

As for the warning, pacman does warn you. It tells you it has installed a *.pacnew file. That tells you two things: (1) you needed to customise the previous default config, and (2) the default config has changed. That copying the pacnew over your old config will break things is standard: blindly copying *any* pacnew over your old, customised file will break things. I agree that it breaks things in a bigger way in this case but the principle is exactly the same. That is not to say that I think a reminder would be out of place - other boot loaders'managers do post such messages. But being told about a pacnew or a pacsave file *is* notification from grub that user intervention is required and this is usually because somebody who knows the system and customisations made previously is required to adapt the changes to accommodate the update. i.e. it is usually because blindly overwriting stuff is very likely to break things.

Last edited by cfr (2013-06-21 00:15:43)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#15 2013-06-24 05:05:36

koz
Member
Registered: 2012-01-09
Posts: 37

Re: [solved] /boot/grub/grub.cfg installed as /boot/grub/grub.cfg.pacnew

cfr wrote:
Natanji wrote:

I just broke my system with this, so I think the package should *at least* post a notice to the user asking him to run "grub-mkconfig -o /boot/grub/grub.cfg" - or simply doing so post-installation, even. I know, my fault, but it's still really easy to overlook...

Since automating it would make it virtually impossible to maintain a manually configured grub.cfg, I disagree. Arch does not do that stuff automatically. Even for those who do not hand edit the config file, it is likely to break things if people have more complex setups. (For example, in some cases, grub will not find an OS unless the partition is mounted and it might not be mounted.) Actually, not even Fedora does this automatically although I suspect that is considered a bug.

As for the warning, pacman does warn you. It tells you it has installed a *.pacnew file. That tells you two things: (1) you needed to customise the previous default config, and (2) the default config has changed. That copying the pacnew over your old config will break things is standard: blindly copying *any* pacnew over your old, customised file will break things. I agree that it breaks things in a bigger way in this case but the principle is exactly the same. That is not to say that I think a reminder would be out of place - other boot loaders'managers do post such messages. But being told about a pacnew or a pacsave file *is* notification from grub that user intervention is required and this is usually because somebody who knows the system and customisations made previously is required to adapt the changes to accommodate the update. i.e. it is usually because blindly overwriting stuff is very likely to break things.


It is automated! WTF?!

This is what pacman threw out at me:

warning: /etc/default/grub saved as /etc/default/grub.pacsave
warning: /boot/grub/grub.cfg saved as /boot/grub/grub.cfg.pacsave
( 1/11) upgrading cgminer                                              [#######################################] 100%
( 2/11) upgrading e2fsprogs                                            [#######################################] 100%
( 3/11) installing grub                                                [#######################################] 100%
Copying /boot/grub/grub.cfg.pacsave to /boot/grub/grub.cfg

Is this intended??

It, thankfully, didn't break anything but this isn't what should have happened. I am sure it will ruin someone's day.

Offline

#16 2013-06-24 12:47:54

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: [solved] /boot/grub/grub.cfg installed as /boot/grub/grub.cfg.pacnew

koz, that's a pacsave which is different from a pacnew. Read about the difference.


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

#17 2013-06-24 20:42:54

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,130

Re: [solved] /boot/grub/grub.cfg installed as /boot/grub/grub.cfg.pacnew

koz wrote:
cfr wrote:
Natanji wrote:

I just broke my system with this, so I think the package should *at least* post a notice to the user asking him to run "grub-mkconfig -o /boot/grub/grub.cfg" - or simply doing so post-installation, even. I know, my fault, but it's still really easy to overlook...

Since automating it would make it virtually impossible to maintain a manually configured grub.cfg, I disagree. Arch does not do that stuff automatically. Even for those who do not hand edit the config file, it is likely to break things if people have more complex setups. (For example, in some cases, grub will not find an OS unless the partition is mounted and it might not be mounted.) Actually, not even Fedora does this automatically although I suspect that is considered a bug.

As for the warning, pacman does warn you. It tells you it has installed a *.pacnew file. That tells you two things: (1) you needed to customise the previous default config, and (2) the default config has changed. That copying the pacnew over your old config will break things is standard: blindly copying *any* pacnew over your old, customised file will break things. I agree that it breaks things in a bigger way in this case but the principle is exactly the same. That is not to say that I think a reminder would be out of place - other boot loaders'managers do post such messages. But being told about a pacnew or a pacsave file *is* notification from grub that user intervention is required and this is usually because somebody who knows the system and customisations made previously is required to adapt the changes to accommodate the update. i.e. it is usually because blindly overwriting stuff is very likely to break things.

It is automated! WTF?!

Not really. One can hand edit grub.cfg and the package does not interfere with that.

This is what pacman threw out at me:

warning: /etc/default/grub saved as /etc/default/grub.pacsave
warning: /boot/grub/grub.cfg saved as /boot/grub/grub.cfg.pacsave
( 1/11) upgrading cgminer                                              [#######################################] 100%
( 2/11) upgrading e2fsprogs                                            [#######################################] 100%
( 3/11) installing grub                                                [#######################################] 100%
Copying /boot/grub/grub.cfg.pacsave to /boot/grub/grub.cfg

Is this intended??

It, thankfully, didn't break anything but this isn't what should have happened. I am sure it will ruin someone's day.

I agree this is strange. I have no idea why it moves your old config to a .pacsave and then copies that .pacsave back to grub.cfg. Effectively what it does is just make a copy of your config as .pacsave but I don't know why it does that.

It is in fact quite unlikely to break anything since it is very likely that an existing grub.cfg will work with the new version of grub. Obviously people should check but if somebody doesn't it is not likely to do any harm. I am not sure what you did to break your configuration but I doubt that you copied grub.cfg.pacsave to grub.cfg.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

Board footer

Powered by FluxBB