0

For example, our /boot/grub/grub.conf looks like this:

## ## End Default Options ##

title           Debian GNU/Linux, kernel 3.2.0-4-amd64
root            (hd0,0)
kernel          /boot/vmlinuz-3.2.0-4-amd64 root=/dev/vda1 ro
initrd          /boot/initrd.img-3.2.0-4-amd64

title           Debian GNU/Linux, kernel 3.2.0-4-amd64 (single-user mode)
root            (hd0,0)
kernel          /boot/vmlinuz-3.2.0-4-amd64 root=/dev/vda1 ro single
initrd          /boot/initrd.img-3.2.0-4-amd64

### END DEBIAN AUTOMAGIC KERNELS LIST

We need to change root=/dev/vda1 to root=/dev/xvda1

Every site I've come across says DO NOT edit /boot/grub/grub.conf directly as it will be overriden when you do update-grub.

Instead, they recommend to add changes to /etc/default/grub - yet that file is in a completely different format (it's a key/value pair)

So in the above example, how would you change the kernel line's root parameter so it persists?

Gary Green
  • 101
  • 1
  • 3
  • Are you talking about GRUB1 or GRUB2? They are very different. This seems to be GRUB1. How this file is created depends on your distribution, but usually a script that creates a configuration would mention the place to make changes along with the "Do not edit" information. – RalfFriedl Dec 22 '18 at 18:22
  • This concerns an ancient version of Debian which is no longer supported, and has not been for quite some time. It's probably best to just migrate your workload to Debian stable. – Michael Hampton Dec 22 '18 at 22:34

0 Answers0