boot from backup copy of fc5 on usb external disk?

2009-02-11 Thread jackson byers
main fc5 system on sda1
[by...@bootp drhmail09]$uname -a
Linux bootp 2.6.17-1.2174_FC5 #1 Tue Aug 8 15:30:55 EDT 2006 i686 i686 i386
GNU/Linux

I am trying to boot from a backupcopy of my mainfc5
which backupcopy is in top dir of the usb disk /dev/sdc1
mounted as /media/disk-1  when in mainfc5
that usbdisk is one large reiserfs partition sdc1

1) first problem
 if i use in grub.conf in a new stanza
root (hd2,0)   corresponding to /dev/sdc1
then boot fails immediately  "hd2 does not exist"

I also note that when booting my mainfc5
there is an early message (not seen in dmesg) something like
  cant find special .../dev/sdc1
then later in the boot process it does find sdc1:
[by...@bootp drhmail09]$ dmesg |grep sdc1
 sdc: sdc1
ReiserFS: sdc1: found reiserfs format "3.6" with standard journal
ReiserFS: sdc1: using ordered data mode
ReiserFS: sdc1: journal params: device sdc1, size 8192, journal first block
18, max trans len 1024, max batch 900, max commit age 30, max trans age 30
ReiserFS: sdc1: checking transaction log (sdc1)
ReiserFS: sdc1: Using r5 hash to sort names

both pieces of evidence imply
that usb disk not available early enough in the boot process

Is there any fix for this or a workaround?



2) second problem
if i cheat and copy the /boot dir from the usb fc5copy  into /dev/sdb3
and use   root (hd1,2)  in grub.conf
then  again attempting to boot from usb  gets to ok booting the kernel

but shortly fails with "could not find /dev/root" and other "couldnotfind"

then kernel panic,locks up
 googling "could not find /dev/root"
reveals that this has been a problem in several fedora last few yrs,
 (most or all of them _not_ using external usb disk)
 fc6,fc7 maybe i saw one on fc8 as well
but no clean solution, in general not obvious (to me) why it occurred.
 some cases helped with use LABELs, some not. ( i tried this, no help)
 some cases helped with complex(to me) mkinitrd
 some cases helped with earlier kernel, but i dont see explanation of why



 In my case,
 the following stanza using an older kernel does boot!
 but has other problems.  eg networking not avail until i do a 2nd boot
 I got the older kernel
 from some oddball kubuntu  thing i was experimenting with way back

title FC5copy (2.6.15-26-386) usbfc5 /media/disk-1 (hd1,2)sdb3 rootusb
 root (hd1,2) ## sdb3
 kernel /boot/vmlinuz-2.6.15-26-386 ro root=LABEL=rootusb  rhgb quiet
 initrd /boot/initrd.img-2.6.15-26-386

this kernel 2.6.15-26-386  instead of what i use in mainfc5
2.6.17-1.2174_FC5

Is there any current advice re "could not find /dev/root"?
has anyone seen it in f8,f9,f10?

thanks for any advice
yes i know i should get f9 or f10.
but i would like to see if I can find clean method to
booting from usbexternal disk.

Jack
-- 
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

Re: boot from backup copy of fc5 on usb external disk?

2009-02-11 Thread Mikkel L. Ellertson
jackson byers wrote:
> main fc5 system on sda1
> [by...@bootp drhmail09]$uname -a
> Linux bootp 2.6.17-1.2174_FC5 #1 Tue Aug 8 15:30:55 EDT 2006 i686 i686
> i386 GNU/Linux
> 
> I am trying to boot from a backupcopy of my mainfc5
> which backupcopy is in top dir of the usb disk /dev/sdc1
> mounted as /media/disk-1  when in mainfc5
> that usbdisk is one large reiserfs partition sdc1
> 
> 1) first problem
>  if i use in grub.conf in a new stanza
> root (hd2,0)   corresponding to /dev/sdc1
> then boot fails immediately  "hd2 does not exist"
> 
Grub uses the BIOS to access the drives. It looks like your BIOS is
not mapping the USB drive. This is BIOS dependent.
> 
> 
> 2) second problem
> if i cheat and copy the /boot dir from the usb fc5copy  into /dev/sdb3
> and use   root (hd1,2)  in grub.conf
> then  again attempting to boot from usb  gets to ok booting the kernel
> 
> but shortly fails with "could not find /dev/root" and other "couldnotfind"
> 
Did you include the usb_storage module in your initrd? If not, you
do not have the proper drivers to access the root file system on
your USB drive.

How you manage things is up to you. I kind of like to set up a
distribution on a USB drive so that it will boot off of any machine
that will boot off of a USB drive. This means that you nave to
select the USB drive as the boot device using the BIOS. (I hit F12,
and pick the boot device on my machine.) As far as Grub is
conserved, it is booting off of drive 0. You still need usb_storage
and the USB controller drivers in the initrd.

Mikkel
-- 

  Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!



signature.asc
Description: OpenPGP digital signature
-- 
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

RE: boot from backup copy of fc5 on usb external disk? [solved]

2009-02-17 Thread jackson byers
feb 17 2009 success booting fc5copy on usb external disk
 thanks to Mikkel for pointing me in  right direction

this fc5copy was not an install, but rather a backup copy of my
mainfc5 on a scsi disk   on sda1

for days i was getting "cant find /dev/root  kernel panic"

finally fixed that with proper mkinitrd see below

then was  getting  cant access resume device /dev/sda2  for days
now understand that occuring bc of disk reordering

part of my problem was using reisrfs on the usb, but ext3 on mainfc5 on sda1
this required an extra  --preload=reiserfs  in mkinitrd cmd
and a further editing of the mkrootdev line  in the initrd  init file.

r...@bootp ~]# mkdir cleanrs2; cd cleanrs2
[r...@bootp cleanrs2]# mkinitrd --preload=ehci-hcd  --preload=usb-storage
--preload=reiserfs   /boot/initrd_usbrs2.img 2.6.17-1.2174_FC5

expand:
[r...@bootp cleanrs2]# gunzip -c initrd_usbrs2.img |cpio -i
5551 blocks
[r...@bootp cleanrs2]# ls
bin  dev  etc  init  initrd_usbrs2.img  lib  proc  sbin  sys  sysroot

now modify the mkrootdev line
from
mkrootdev -t ext3 -o defaults,ro /dev/sda1
to
mkrootdev -t reiserfs -o defaults,ro /dev/sdc1

repack:
[r...@bootp cleanrs2]# find . |cpio -c -o |gzip -9 >../initrd_usbrs2.img

at this point, still getting  "cant access resume device /dev/sda2"
but no longer getting caught in "cant find /dev/root"

next problem  was getting caught in filesytem check on  sda1,sda3
which eventually forced a reboot,  but no kernel panic!
The sda1,sda3 problems evidently bc of reordering of the disks (see below)
I got around this gotcha by
commenting out the sda1, sda3 lines in the usb fstab

my mainfc5 grub.conf has following stanza for the usb boot

title FC5copy (2.6.17-1.2174_FC5_usbrs2.img)  /media/disk-1 (hd1,2)
  root (hd1,2)  ## sdb3
  kernel /boot/vmlinuz-2.6.17-1.2174_FC5 ro root=LABEL=rootusb  rhgb
quiet
  initrd /boot/initrd_usbrs2.img


when booted up from usb:
fdisk clearly shows disks have been reordered

[r...@bootp ~]# fdisk -l

Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot  Start End  Blocks   Id  System
/dev/sda1   1   30401   244196001   83  Linux  <<<  root (hd1,2)  in grub.conf

this is  just a holding tank for the /boot files:
I am not treating it as a "separate /boot partition", not listed in fstab

regards,
Jack
-- 
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines