All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andries Brouwer <aebr@win.tue.nl>
To: Roy Sigurd Karlsbakk <roy@karlsbakk.net>
Cc: Kernel mailing list <linux-kernel@vger.kernel.org>
Subject: Re: lilo/raid?
Date: Mon, 1 Jul 2002 17:59:10 +0200	[thread overview]
Message-ID: <20020701155910.GA21471@win.tue.nl> (raw)
In-Reply-To: <200207011604.58253.roy@karlsbakk.net>

On Mon, Jul 01, 2002 at 04:04:58PM +0200, Roy Sigurd Karlsbakk wrote:

> still - sorry if this is OT - I'm just too close to tear my hair or head off 
> or something
> 
> The documentation everywhere, including the lilo 22.3.1 sample conf ffile 
> tells me "use boot = /dev/md0", but lilo, when run, just tells me 
> 
> Fatal: Filesystem would be destroyed by LILO boot sector: /dev/md0
> 
> Please help

But (i) why don't you ask the maintainer of LILO,
(ii) why don't you read the source?

If I grep for "Filesystem would be destroyed" in the LILO sources
I find it in lilo-22.3.1/bsect.c:

    ireloc = part_nowrite(boot_dev);
    if (ireloc>1) {
        die("Filesystem would be destroyed by LILO boot sector: %s", boot_dev);
    }

So, some routine part_nowrite() returned a value larger than 1.
This routine lives in partition.c and does

int part_nowrite(char* device)
{
    int fd;
    BOOT_SECTOR bs;

    int ret=0;  /* say ok, unless we recognize a problem partition */

    if ((fd = open(device, O_RDONLY)) < 0) pdie("part_nowrite check:");
    if (read(fd, bs.sector, sizeof(bs)) != SECTOR_SIZE) pdie("part_nowrite: rea\
d:");

/* check for XFS */
    if (!strncmp("XFSB", bs.sector, 4)) ret=2;

/* check for NTFS */
    else if (   !strncmp("NTFS", bs.par_d.system, 4)
                || strstr(bs.sector,"NTLDR")  ) ret=2;

/* check for SWAP -- last check, as 'bs' is overwritten */
    else if (*(long*)bs.sector == 0xFFFFFFFEUL) {
        if (lseek(fd, (PAGE_SIZE)-SECTOR_SIZE, SEEK_SET) != (PAGE_SIZE)-SECTOR_\
SIZE)
            pdie("part_nowrite lseek:");
        if (SECTOR_SIZE != read(fd, bs.sector, sizeof(bs)) ) pdie("part_nowrite\
 swap check:");
        if (!strncmp(bs.sector+SECTOR_SIZE-10,"SWAPSPACE2",10)
            || !strncmp(bs.sector+SECTOR_SIZE-10,"SWAP-SPACE",10) ) ret=2;
    }

/* check for override (-F) command line flag */
    if (ret==2 && force_fs) {
        fprintf(errstd, "WARNING: '-F' override used. Filesystem on  %s  may be\
 destroyed.\n", device);
        ret=0;
    }

    return ret;
}

So, it looks like (1) you can use the -F flag and lilo will go ahead anyway,
(2) lilo thinks it recognizes XFS or NTFS or swap space on the boot sector
of your device.

It must be easy for you to investigate what you have in reality, and
determine whether there is any potential problem.

Andries

  parent reply	other threads:[~2002-07-01 15:56 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-01 14:04 lilo/raid? Roy Sigurd Karlsbakk
2002-07-01 15:52 ` lilo/raid? Bill Davidsen
2002-07-01 16:02   ` lilo/raid? Roy Sigurd Karlsbakk
2002-07-01 18:36     ` lilo/raid? Bill Davidsen
2002-07-01 15:59 ` Andries Brouwer [this message]
2002-07-01 16:15   ` lilo/raid? Roy Sigurd Karlsbakk
2002-07-01 15:59     ` lilo/raid? Zwane Mwaikambo
2002-07-02  8:16       ` lilo/raid? Helge Hafting
2002-07-02  9:12         ` lilo/raid? Zwane Mwaikambo
2002-07-02 10:26           ` lilo/raid? jw schultz
2002-07-02 10:28           ` lilo/raid? Jakob Oestergaard
2002-07-02 11:33         ` lilo/raid? Roy Sigurd Karlsbakk
2002-07-03  9:43           ` lilo/raid? Helge Hafting
2002-07-03 10:02             ` lilo/raid? Roy Sigurd Karlsbakk
2002-07-02 11:27       ` lilo/raid? Roy Sigurd Karlsbakk
2002-07-01 16:05 ` lilo/raid? Fabio Massimo Di Nitto
2002-07-01 16:07   ` lilo/raid? Roy Sigurd Karlsbakk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020701155910.GA21471@win.tue.nl \
    --to=aebr@win.tue.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=roy@karlsbakk.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.