[SLUG] Was 'kernel panic', now '/usr/sbin/: Not found.'

2011-08-28 Thread adam.bogacki
I am trying to reinstall GNU GRUB 1.97~beta4 on an Ubuntu
WattOS RC1 (/dev/sda) / Debian 6 (/dev/sdb) dual-boot
system.

sudo fdisk -l

Disk /dev/sda: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0001

   Device Boot  Start End  Blocks   Id 
System
/dev/sda1   *   1   23572   189342058+  83 
Linux
/dev/sda2   23573   24321 60163125 
Extended
/dev/sda5   23573   24321 6016311   82 
Linux swap / Solaris

Disk /dev/sdb: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00060463

   Device Boot  Start End  Blocks   Id 
System
/dev/sdb1   1   38127   306246656   83 
Linux
/dev/sdb2   38127   38914 63221775 
Extended
/dev/sdb5

I mount dev, proc, sys, and usr on /dev/sda (aka w1), and

guest@guest:~$ sudo chroot /mnt/w1 /bin/bash
root@guest:/# update-grub2
root@guest:/# grub-install /dev/sda
/usr/sbin/: Not found.

I'm stumped.

I have previously done

root@guest:/# grub-install /dev/sda1

getting ...

init[1]: segfault at 0 ip (null) sp bfd65e44 error 4
kernel panic - not syncing: Attempted to kill init !
Pid: 1 comm: init Not tainted
2.6.31-23-generic # 75-Ubuntu 

.. but have since become aware I should not specify
partition number.

Inspecting files on the WattOSRC1 drive (w1), it seems I
have two GRUB folders

guest@guest:/mnt/w1$ ls
bindebootstrap  grubinitrd.img.old  man1  
openbox  proc sbin sys  var
boot   dev  homelib media  opt  
   resolv.conf  selinux  tmp  vmlinuz
cdrom  etc  initrd.img  lost+found  mntopt1 
   root srv  usr  vmlinuz.old


and

guest@guest:/mnt/w1/boot$ ls
bindebootstrap  grubinitrd.img.old  man1  
openbox  proc sbin sys  var
boot   dev  homelib media  opt  
   resolv.conf  selinux  tmp  vmlinuz
cdrom  etc  initrd.img  lost+found  mntopt1 
   root srv  usr  vmlinuz.old

The best way to get a working dual-boot GRUB2 seems to be to
delete one of the grub folders, and tell GRUB2 where the
kernel and root fs are. 

I have been messing around with rescue prompt boot
instructions and have been able to 
boot into the debian drive, initially in graphic (with
stationary mouse) and later in text mode, but it seems a bit
hit and miss, lately mostly miss. Dunno why .. maybe too
many changes.

I'd appreciate any constructive advice as I am about to move
house and will be off-line for a while. I'm starting to
appreciate Live-CDs.

Cheers,

Adam Bogacki,

adam.boga...@clear.net.nz 


-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] Was 'kernel panic', now '/usr/sbin/: Not found.'

2011-08-28 Thread Matthew Hannigan
On Mon, Aug 29, 2011 at 10:10:45AM +1200, adam.bogacki wrote:

 I mount dev, proc, sys, and usr on /dev/sda (aka w1), and

What does df or mount show at this point 

 guest@guest:~$ sudo chroot /mnt/w1 /bin/bash

and this point 

-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] Was 'kernel panic', now '/usr/sbin/: Not found.'

2011-08-28 Thread adam.bogacki
Thanks, Matt

guest@guest:/mnt/w1$ df
Filesystem   1K-blocks  Used Available Use%
Mounted on
aufs   1609136355264   1253872  23% /
udev   1609136   268   1608868   1% /dev
/dev/sr0494714494714 0 100%
/media/cdrom
/dev/loop0  482176482176 0 100%
/rofs
none   1609136 0   1609136   0%
/dev/shm
tmpfs  160913660   1609076   1% /tmp
none   1609136   284   1608852   1%
/var/run
none   1609136 0   1609136   0%
/var/lock
none   1609136 0   1609136   0%
/lib/init/rw
/dev/sda1186370356  42304704 134598552  24%
/mnt/w1
/dev/sdb1301440504   8589276 277538896   4%
/mnt/deb
/dev/sda1186370356  42304704 134598552  24%
/mnt/w1/boot
guest@guest:/mnt/w1$ mount
aufs on / type aufs (rw)
none on /proc type proc (rw,noexec,nosuid,nodev)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
udev on /dev type tmpfs (rw,mode=0755)
/dev/sr0 on /media/cdrom type iso9660 (rw)
/dev/loop0 on /rofs type squashfs (rw)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
none on /dev/pts type devpts
(rw,noexec,nosuid,gid=5,mode=0620)
none on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,mode=0755)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
none on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
/dev/sda1 on /mnt/w1 type ext4 (rw)
/dev/sdb1 on /mnt/deb type ext3 (rw)
/dev/sda1 on /mnt/w1/boot type ext4 (rw)
/dev on /mnt/w1/dev type none (rw,bind)
/dev on /mnt/w1/proc type none (rw,bind)
/dev on /mnt/w1/sys type none (rw,bind)
/usr on /mnt/w1/usr type none (rw,bind)
guest@guest:/mnt/w1$ ^C
guest@guest:/mnt/w1$ 

and 

guest@guest:~$ sudo chroot /mnt/w1 /bin/bash
root@guest:/# df
Segmentation fault
root@guest:/# mount
Segmentation fault
root@guest:/# 

.. but, significantly, chroot worked this time.

Adam.

- Original Message Follows -
 On Mon, Aug 29, 2011 at 10:10:45AM +1200, adam.bogacki
 wrote:
 
  I mount dev, proc, sys, and usr on /dev/sda (aka w1),
 and
 
 What does df or mount show at this point 
 
  guest@guest:~$ sudo chroot /mnt/w1 /bin/bash
 
 and this point 
 
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] Was 'kernel panic', now '/usr/sbin/: Not found.'

2011-08-28 Thread adam.bogacki
Fy,

Adam.
 
- Message Forwarded on Mon 29/8/2011 -
From: adam.bogacki adam.boga...@clear.net.nz
To: Matthew Hannigan m...@zip.com.au
Subject: Re: [SLUG] Was 'kernel panic', now '/usr/sbin/: Not
found.'
Date: Mon, 29 Aug 2011 12:37:47 +1200

.. but I still get this

root@guest:/# update-grub
root@guest:/# grub-install /dev/sda
/usr/sbin/: Not found.

Adam.

- Original Message Follows -
 On Mon, Aug 29, 2011 at 10:10:45AM +1200, adam.bogacki
 wrote:

  I mount dev, proc, sys, and usr on /dev/sda (aka w1),
 and

 What does df or mount show at this point

  guest@guest:~$ sudo chroot /mnt/w1 /bin/bash

 and this point

--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] Was 'kernel panic', now '/usr/sbin/: Not found.'

2011-08-28 Thread adam.bogacki
I deleted the second version of 'grub' in /mnt/w1 but now
find that I have

guest@guest:/mnt/w1/boot/boot/grub$ vi grub.cfg
 
.. a boot within a boot dir .. implying non-recursive
deletion .. ?

Adam.

- Original Message Follows -
 On Mon, Aug 29, 2011 at 10:10:45AM +1200, adam.bogacki
 wrote:
 
  I mount dev, proc, sys, and usr on /dev/sda (aka w1),
 and
 
 What does df or mount show at this point 
 
  guest@guest:~$ sudo chroot /mnt/w1 /bin/bash
 
 and this point 
 
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html