sudo gedit /boot/grub/menu.lst
#1
Hi,

XBMCLive question for you...

I want to grab a backup of the grub bootloader however when to exit out to a terminal and run the command 'sudo gedit /boot/grub/menu.lst' i get the error 'sudo: gedit: command not found'.

Any ideas?

Cheers
Reply
#2
'sudo pico /boot/grub/menu.lst' worked instead.
Reply
#3
nope, still lost!

Can anyone tell me how to backup the grub bootloader menu.1st file to an external drive?

Thanks
Reply
#4
LOL... has anyone guessed i'm a Windows man!
Reply
#5
Gedit won't work as it's not installed on the live system. Pico should work, when you say it did and then it didn't, what happened?

I don't actually have a Live install built yet, but are nano and/or vim installed? Maybe try using one of those instead?

You say you're a Windows user. How are you connecting to the Live box to run these commands, a terminal or SSH? If SSH, grab a copy of WinSCP and connect the same as you would connect via SSH, browse to /boot/grub in the right panel and copy menu.lst into the left panel and it'll be moved onto your machine.

If via terminal, and you don't have SSH enabled or SMB shares on the box, the best option for backing it up is probably a USB pen drive.
Reply
#6
its lst, not 1st (lst as in LIST not as in FIRST)
does this help?

sudo gedit won't work because you dont have gedit on a (mostly) cli driven system. but pico or nano will


but you dont really need to edit the file anyway, only copy it. you need to mount a drive and then copy it with the cp command. or alternativley, use winscp to connect to your system and do everything with a gui.
Reply
#7
Mine is named menu.1st. When trying to copy to a mounted usb stick (using 'cp /boot/grub/menu.1st ~/MyUSB/') i get permission denied. Also get the same if try copying directly to the stick.

Checking google now however if anyone has any bright ideas, feel free to post.

Cheers
Reply
#8
Ah, ok i need to be logged in as root.

[EDIT:] yeah, that did it.
Reply
#9
It's not even lst. It's grub.cfg. lst is a grub1 thing. It probably got renamed menu.1st so that it wasn't accidentally used.

Ubuntu has grub2 default since probably 9.10
Code:
GRANT ALL PRIVILEGES ON `xbmc_%`.* TO 'xbmc'@'%';
IF you have a mysql problem, find one of the 4 dozen threads already open.
Reply
#10
Yeah, i've since figured that. Not sure why I had a menu.1st? Maybe due to the fact I was previously playing around with easybcd in the Windows dual boot install. I might have installed grub1 from there.
Reply
#11
Yep.

Just memorize the grub commands and what they actually mean and you won't need to backup the cfg, which is more or less useless if your grub is hosed.

I can't name the number times I've repaired grub with just
Figure out what drives are where:
Code:
ls (hd<tab>

Load the kernel
Code:
linux (hd0,1)/boot/lin<tab> root=/dev/sda1

load ram disk
Code:
initrd (hd0,1)/boot/ini<tab>

Boot
[code]boot[/boot]

Hell, I've talked my GF through it over text messages when Windows 7 hosed her dual boot machine.

Teach a man to use grub and he'll always be able to fix it. Backup a man's grub.cfg and the second a parameter changes (move disks around, add disks, update kernel) he's hosed.
Code:
GRANT ALL PRIVILEGES ON `xbmc_%`.* TO 'xbmc'@'%';
IF you have a mysql problem, find one of the 4 dozen threads already open.
Reply

Logout Mark Read Team Forum Stats Members Help
sudo gedit /boot/grub/menu.lst0