Professional Web Applications Themes

Debian lilo boot dev change - Linux Setup, Configuration & Administration

So I've got a dual boot system using lilo, Window$ on /dev/hda and Debian Linux on /dev/hdb. Thing is, I've decided I don't need Window$ and want to recoup the /dev/hda extra space. However I'm booting off /dev/hda and need to change it before I repartition the drive. Can I just change the line in lilo to "boot=/dev/hdb" and run lilo as root to change the boot device, or is it more complicated than that? My disks look like so: Partition Table for /dev/hda # Type Sector Sector Offset Length Filesystem Type (ID) Flag -- ------- ----------- ----------- ------ ----------- ...

  1. #1

    Default Debian lilo boot dev change

    So I've got a dual boot system using lilo, Window$ on
    /dev/hda and Debian Linux on /dev/hdb. Thing is,
    I've decided I don't need Window$ and want to
    recoup the /dev/hda extra space.

    However I'm booting off /dev/hda and need to
    change it before I repartition the drive.

    Can I just change the line in lilo to
    "boot=/dev/hdb" and run lilo as root to change the
    boot device, or is it more complicated than that?


    My disks look like so:

    Partition Table for /dev/hda
    # Type Sector Sector Offset Length Filesystem Type (ID) Flag
    -- ------- ----------- ----------- ------ ----------- -------------------- ----
    1 Primary 0 78140159 63 78140160 HPFS/NTFS (07) Boot
    Pri/Log 78140160 78156224 0 16065 Free Space None

    Partition Table for /dev/hdb
    First Last
    # Type Sector Sector Offset Length Filesystem Type (ID) Flag
    -- ------- ----------- ----------- ------ ----------- -------------------- ----
    1 Primary 0 1172744 63 1172745 Linux swap (82) Boot
    2 Primary 1172745 58621184 0 57448440 Linux (83) None


    and I notice in my /etc/lilo.conf this:
    # Specifies the boot device. This is where Lilo installs its boot
    # block. It can be either a partition, or the raw device, in which
    # case it installs in the MBR, and will overwrite the current MBR.
    #
    boot=/dev/hda

    Thanks,
    G
    Gman Guest

  2. #2

    Default Re: Debian lilo boot dev change

    On 10 Oct 2003 03:56:10 GMT, Gman <com> wrote: 

    I'd format hda and make a small boot partition, mkdir /boot and cp -a
    the contents of /boot there, edit /etc/lilo.conf and /etc/fstab and run lilo.

    But hang tight. Your idea may be feasible. Not sure.

    VERY satisfying to send M$ to the bitdump. Congradulations!
    See man shred :-)

    --
    Later, Alan C
    You can find my email address at the website: contact.html
    take control of your mailbox ----- elrav1 ----- http://tinyurl.com/l55a
    Alan Guest

  3. #3

    Default Re: Debian lilo boot dev change

    > So I've got a dual boot system using lilo, Window$ on /dev/hda and 

    no problem.
     

    no you don't need to change a thing (probably)
     

    You boot already through lilo?
    As long as the drive remains there, there should be no problem.
    Don't bother to write an MBR to hdb.

    make a bootfloppy though.
     

    it will be a little more complicated than that.
    That just writes the MBR of hdb. you'll still be booting from hda.
    If you remove hda, hdb becomes known as 0x80 by the BIOS, it'll fail
    in finding this drive as the MBR of hdb still searches for drive 0x81
    which hdb was when hda was still present.

    The solution you need depends on what you want to do.
    Do you want to move hdb to hda?
    Or do you want to keep the layout as is, and add some extra storage
    ,eg to /var on hda?

    The latter is the easiest, as that requires nothing extra from you.
    (except that you should not erase the MBR)

    Eric
    Eric Guest

  4. #4

    Default Re: Debian lilo boot dev change

    On Fri, 10 Oct 2003 08:33:04 +0200, Eric Moors <land> wrote: 

    I did do that...

     

    I was thinking the latter too. I'll leave the
    hardware as is and set up /dev/hda to mount on
    /disk2 or some such.

    I'll test out my boot floppy.

    So if I use cfdisk to repartition /dev/hda to one
    big Linux partition and then use "mkfs -v -t ext2
    -c /dev/hda" I should be good, eh?

    G
    Gman Guest

  5. #5

    Default Re: Debian lilo boot dev change

    >> make a bootfloppy though. 

    good.
     

    No!
    mke2fs <whatever switches you want here> /dev/hda1

    Do not forget that 1.

    Eric
    Eric Guest

  6. #6

    Default Re: Debian lilo boot dev change

    On Fri, 10 Oct 2003 08:33:04 +0200, Eric Moors <land> wrote:
     
    >
    >no problem.

    >
    >no you don't need to change a thing (probably)

    >
    >You boot already through lilo?
    >As long as the drive remains there, there should be no problem.
    >Don't bother to write an MBR to hdb.
    >
    >make a bootfloppy though.

    >
    >it will be a little more complicated than that.
    >That just writes the MBR of hdb. you'll still be booting from hda.
    >If you remove hda, hdb becomes known as 0x80 by the BIOS, it'll fail
    >in finding this drive as the MBR of hdb still searches for drive 0x81
    >which hdb was when hda was still present.[/ref]

    Moving disks around is a lot easier with LILO 22.5++, as it is not sensitive
    to changes in the BIOS device codes (it boots by VolumeID, and determines the
    BIOS device codes dynamically at boot time). Earlier versions of LILO boot
    from fixed BIOS device codes, and will fail if you alter the BIOS device codes
    that were used at the time the LILO boot record was installed.

    The boot floppy suggestion is the best insurance available.

    --John





     

    JohnInSD Guest

  7. #7

    Default Re: Debian lilo boot dev change

    On Fri, 10 Oct 2003 15:09:42 GMT, JohnInSD At san DOT rr dot COM <com> wrote: 

    Far better than an ordinary boot floppy is a complete micro-linux chock
    full of utilities that runs in a ramdisk.

    Like tomsrtbt. Since I acquired it I have never used a boot floppy or
    conventional resue disk.

    It even has networking capability, so that you can connect to another
    machine and bring over files or entire directory trees that might have been
    deleted or corrupted on the machine you are repairing (etc.).

    --
    Later, Alan C
    You can find my email address at the website: contact.html
    take control of your mailbox ----- elrav1 ----- http://tinyurl.com/l55a
    Alan Guest

  8. #8

    Default Re: Debian lilo boot dev change

    On Fri, 10 Oct 2003 16:17:21 +0200, Eric Moors <land> wrote: 
    >>
    >> I did do that...
    >> I'll test out my boot floppy.[/ref]
    >
    > good.

    >
    > No!
    > mke2fs <whatever switches you want here> /dev/hda1
    >
    > Do not forget that 1.
    >
    > Eric[/ref]

    I'll take your word for it, but I can't seem to
    find a resource that explains the difference
    between these 2.

    What does mke2fs do that mkfs doesn't?

    G
    Gman Guest

  9. #9

    Default Re: Debian lilo boot dev change

    On 10 Oct 2003 19:16:30 GMT,
    Gman <com> wrote: 
    > >
    > > good.
    > > 
    > >
    > > No!
    > > mke2fs <whatever switches you want here> /dev/hda1
    > >
    > > Do not forget that 1.
    > >
    > > Eric[/ref]
    >
    > I'll take your word for it, but I can't seem to
    > find a resource that explains the difference
    > between these 2.
    >
    > What does mke2fs do that mkfs doesn't?[/ref]

    It allows you to drop the "-t ext2," He is emphasizing

    s/hda/hda1/

    The disk still needs a partition table, you only want to format the
    partition, not the whole disk.

    Michael C.
    --
    com http://mcsuper5.freeshell.org/
    Registered Linux User #303915 http://counter.li.org/


    Michael Guest

  10. #10

    Default Re: Debian lilo boot dev change

    On 11 Oct 2003 06:08:40 GMT, Michael C. <com> wrote: 
    >>
    >> I'll take your word for it, but I can't seem to
    >> find a resource that explains the difference
    >> between these 2.
    >>
    >> What does mke2fs do that mkfs doesn't?[/ref]
    >
    > It allows you to drop the "-t ext2," He is emphasizing
    >
    > s/hda/hda1/
    >
    > The disk still needs a partition table, you only want to format the
    > partition, not the whole disk.
    >
    > Michael C.[/ref]

    Ah yes...
    Gman Guest

Similar Threads

  1. Floppy boot option in Lilo
    By Darsin in forum Linux Setup, Configuration & Administration
    Replies: 8
    Last Post: August 9th, 07:05 AM
  2. Change *first* bootloader from Lilo to Winxp with boot.ini
    By silly in forum Linux Setup, Configuration & Administration
    Replies: 1
    Last Post: July 3rd, 03:49 AM
  3. Debian lilo won't boot Redhat
    By Bijan Soleymani in forum Debian
    Replies: 9
    Last Post: July 2nd, 10:40 PM
  4. dual boot problems: LILO stops at LI
    By Douglas Mayne in forum Linux Setup, Configuration & Administration
    Replies: 11
    Last Post: July 2nd, 09:23 AM
  5. Using Lilo to boot more than one Linux distro.
    By Jon Haugsand in forum Linux Setup, Configuration & Administration
    Replies: 3
    Last Post: June 30th, 12:04 PM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139