Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #180814

[SOLVED] attempt to read or write outside of disk 'hd0'

From Joe <joe@jretrading.com>
Newsgroups linux.debian.user
Subject [SOLVED] attempt to read or write outside of disk 'hd0'
Date 2017-05-07 15:40 +0200
Message-ID <tEuzL-5TC-5@gated-at.bofh.it> (permalink)
References (1 earlier) <tE2Nb-5f8-3@gated-at.bofh.it> <tE3pU-5Jf-13@gated-at.bofh.it> <tE8zf-CU-11@gated-at.bofh.it> <tE9EZ-1kH-5@gated-at.bofh.it> <tEaB3-1Sz-15@gated-at.bofh.it>
Organization JRE Trading Ltd

Show all headers | View raw


On Sat, 6 May 2017 18:12:03 +0200
Pascal Hambourg <pascal@plouf.fr.eu.org> wrote:

> Le 06/05/2017 à 17:19, Joe a écrit :
> >>
> >> However, the ls command I suggested may still be useful to check
> >> GRUB's idea of the sizes.  
> >
> > ls (hd0)
> > (hd0): Filesystem is unknown.
> >
> > ls (hd0,1)
> > (hd0,1): Filesystem is ext2. (after several seconds' pause)
> >
> > I'm only getting the grub rescue> prompt, not the grub> prompt.  
> 
> I expected that "ls" would be the same in normal and rescue mode. 
> Obviously I was wrong.
> 
> If the GRUB version on the internal disk is the same, you could boot 
> from it while the USB disk is connected, and if the BIOS exposes the
> USB disk even though it is not the boot disk (some BIOS do, others
> don't), then you could use the "ls" command in normal mode to check
> (hd1) and (hd1,1).

Yes, that works, and looks right:

Device hd1: No known filesystem detected - Sector size 512B - Total
size 117220824KiB

Partition hd1,1: Filesystem type ext* - (Last mod time, UUID)
Partition start at 1024KiB - Total size 10485760KiB

However, (still from the host machine's grub):

grub> ls (hd1,1)/boot
< reasonable listing >

grub> set root=(hd1,1)
grub> linux /boot/vmlinuz-4.6.0-1-686-pae root=/dev/sdb1

gets me: error: "attempt to read or write outside of disk 'hd1'."

This result, from a second grub installation, suggests a broken
filesystem, despite the partition being readable and writeable when
mounted. I had already copied /etc from the drive, and was trying one
last attempt to boot to obtain a dpkg --get-selections in preparation
for a reinstall. A quick fsck /dev/sdb1 from the host confirms this,
and a couple of fsck -y runs (what have I to lose?) gets it booting
again. So --get-selections saved, and now to try the long-delayed
dist-upgrade...

Thanks again.

-- 
Joe

Back to linux.debian.user | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

attempt to read or write outside of disk 'hd0' Joe <joe@jretrading.com> - 2017-05-05 23:40 +0200
  Re: attempt to read or write outside of disk 'hd0' Pascal Hambourg <pascal@plouf.fr.eu.org> - 2017-05-06 10:00 +0200
    Re: attempt to read or write outside of disk 'hd0' Joe <joe@jretrading.com> - 2017-05-06 10:40 +0200
      Re: attempt to read or write outside of disk 'hd0' Pascal Hambourg <pascal@plouf.fr.eu.org> - 2017-05-06 16:10 +0200
        Re: attempt to read or write outside of disk 'hd0' Joe <joe@jretrading.com> - 2017-05-06 17:20 +0200
          Re: attempt to read or write outside of disk 'hd0' Pascal Hambourg <pascal@plouf.fr.eu.org> - 2017-05-06 18:20 +0200
            Re: attempt to read or write outside of disk 'hd0' Joe <joe@jretrading.com> - 2017-05-06 20:10 +0200
              Re: attempt to read or write outside of disk 'hd0' Pascal Hambourg <pascal@plouf.fr.eu.org> - 2017-05-06 20:50 +0200
                Re: attempt to read or write outside of disk 'hd0' Joe <joe@jretrading.com> - 2017-05-06 22:20 +0200
            [SOLVED] attempt to read or write outside of disk 'hd0' Joe <joe@jretrading.com> - 2017-05-07 15:40 +0200

csiph-web