Find the answer to your Linux question:
Results 1 to 7 of 7
Hi, I need to get rid of Lilo on my boot sector. I tried this and got permission denied: When Lilo overwrites a boot sector, it saves a backup copy ...
  1. #1
    Linux Newbie
    Join Date
    Feb 2005
    Location
    England
    Posts
    123

    Lilo

    Hi,
    I need to get rid of Lilo on my boot sector. I tried this and got permission denied:

    When Lilo overwrites a boot sector, it saves a backup copy in /boot/boot.xxyy, where xxyy are the major and minor numbers of the device, in hex. You can see the major and minor numbers of your disk or partition by running ``ls -l /dev//device''. For example, the first sector of /dev/hda (major 3, minor 0) will be saved in /boot/boot.0300, installing Lilo on /dev/fd0 creates /boot/boot.0200 and installing on /dev/sdb3 (major 8, minor 19) creates /boot/boot.0813. Note that Lilo won't create the file if there is already one so you don't need to care about the backup copy whenever you reinstall Lilo (for example, after recompiling your kernel). The backup copies found in /boot/ are always the snapshot of the situation before installing any Lilo.

    If you ever need to uninstall Lilo (for example, in the unfortunate case you need to uninstall Linux), you just need to restore the original boot sector. If Lilo is installed in /dev/hda, just do ``dd if=/boot/boot.0300 of=/dev/hda bs=446 count=1'' (I personally just do ``cat /boot/boot.0300 > /dev/hda'', but this is not safe, as this will restore the original partition table as well, which you might have modified in the meanwhile). This command is much easier to run than trying ``fdisk /mbr'' from a DOS shell: it allows you to cleanly remove Linux from a disk without ever booting anything but Linux. After removing Lilo remember to run Linux' fdisk to destroy any Linux partition (DOS' fdisk is unable to remove non-dos partitions).

    If you installed Lilo on your root partition (e.g., /dev/hda2), nothing special needs to be done to uninstall Lilo. Just run Linux' fdisk to remove Linux partitions from the partition table. You must also mark the DOS partition as bootable.

    I was in vector linux at the time. ANy ideas on what 2 do?

    I want to install grub instead btw

  2. #2
    Linux User Krendoshazin's Avatar
    Join Date
    Feb 2005
    Location
    London, England
    Posts
    385
    are you asking how to get rid of lilo from the MBR? if so, check your bios and make sure that the MBR is not password protected, this is the most common cause of not being able to write to the MBR.

  3. #3
    Linux Engineer
    Join Date
    Mar 2005
    Location
    Where my hat is
    Posts
    765
    First of all, we need to know where LILO was installed. Did you install it to the MBR or root partition?

    If you installed to the MBR and are running XP, fdisk/mbr is the wrong command to use.

    To restore the MBR to its original state using XP, you need to:

    Take the installation CD for XP and allow it to boot all the way up. You'll get three options, select R for repair.

    You'll then be asked which windows installation you want to repair, select it. You'll then be asked for the admin password. Once given, you'll find yourself at the DOS prompt. Type: FIXMBR and when asked if you wish to continue, say yes. Type exit and you're all done. MBR should be fixed and good to go at that point.
    Registered Linux user #384279
    Vector Linux SOHO 6 / Vector Linux 7 RC 3.4

  4. #4
    Linux User Krendoshazin's Avatar
    Join Date
    Feb 2005
    Location
    London, England
    Posts
    385
    your post makes sense now, you should put the information you tried into quote tags, this makes it easier to understand. also i believe the last post i made should be the soloution

  5. #5
    Linux Newbie
    Join Date
    Feb 2005
    Location
    England
    Posts
    123
    Ok, its on the MBR, I just installed archlinux and ut removed LIlo for me.

  6. #6
    Linux User
    Join Date
    Oct 2004
    Location
    /dev/random
    Posts
    404
    You could uninstall LILO by logging in as root and simply running the command lilo -u
    It's documented - try man 8 lilo.
    The Unforgiven
    Registered Linux User #358564

  7. #7
    Linux Engineer
    Join Date
    Mar 2005
    Location
    Where my hat is
    Posts
    765
    Provided the backup that was created is the original image of the MBR.
    Registered Linux user #384279
    Vector Linux SOHO 6 / Vector Linux 7 RC 3.4

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...