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?