AMuse wrote:
> Darryl: I had many, many problems with Grub under Debian 5 on the 
> net5501.  Although there are a series of complicated steps you can take 
> to get it running (sometimes) , LILO works fine out of the box.
> 
> I recommend you just install LILO as your boot loader if you want to use 
> Deb5 on net5501 - it'll work fine and save you a lot of headache.

Thanks for your reply.

I'm a little hesitant to go back to LILO (and go back on over 10 years 
progress) since the remote upgrades might become an issue as LILO is 
much fragile.

My gut feeling is that there is a translation bug, possibly due to the 
large 16Gb SanDisk card I am using inside of comBIOS, it calls to load a 
block and it is simply accessing garbage.

GRUB seems to work fine with both Debian and Fedora modern ext3 
filesystems that have extra options, such as signed_directory_hash, 
resize_inode and on large paritions of this side, so this is why I'm not 
pointing the finger at GRUB this minute.


So I can only think it is some kind of comBIOS bug.  The data it is 
requesting or the data that is being returned isn't the expected data 
for that block.


What is the licensing that comBIOS is distributed under ?  is this 
available for peer review.


It should be easy enough to make GRUB have a "dumpblock <lba>" or it 
emit, "lba, top(4 bytes), tail(4 bytes) and checksum" of each sector it 
loads.  Then have another tool hunt for that block and prove it is not 
loading the correct one.

For me it does seem that it is able to access the:
  * Start of the medium (partition table, LBA block 0)
  * Start of the partition (ext3 superblock, LBA block 63)
  * The root directory (which is at filesys block 512, see below for 
working, LBA block 1087=(512*2)+63)

It does not seem to be able to access
  * filesys block 84481 (/grub directory contents), LBA block 
169025=(84481*2+63), which is approx 10.52 cylinders in old money


Maybe I can craft my kernel image and initrd to fit within the first 
cylinder using to prove that it will boot providing I do not cross a 
cylinder boundary for any data access necessary for GRUB.  Maybe I can 
just shrink my partition below 16065-63 sectors.


Yes I can report when I did this (shrink my /boot so its less than 1 
cylinder) my net5501 boots up fine.  The commands I used:


mkdir /tmp/saved/boot
cp -av /boot/* /tmp/saved/boot/
umount /boot

# 8001 Kb is under the 1 cylinder limit:
#
# (63 sectors * 255 heads) minus 63 sectors, divide by 2
# working...
#  63 sectors * 255 heads = the reported geometry giving the sectors per 
cylinder
#  minus 63 sectors = the space of the partition table and MBR
#  divide 2 = convert sectors to Kb blocks for mkfs.ext2 block-size

  /sbin/mkfs.ext2 -m 0 -L boot -t ext2 -O 
^resize_inode,^sparse_super,^large_file,^ext_attr /dev/sda1 8001
  /bin/mount -t ext2 -w /dev/sda1 /boot

  mkdir /boot/grub
  cp /tmp/saved/boot/grub/menu.lst /boot/grub/
  cp /tmp/saved/boot/bzImage-2.6.33 /boot/grub/
  cp /tmp/saved/boot/initrd.img-2.6.33 /boot/grub/

  # This puts stage1/1.5/2 back into /boot/grub
  /usr/sbin/grub-install --no-floppy --force-lba --recheck --debug hd0


Obviously is painful having a 7754 Kb (of usable space) /boot partition, 
since I can't do upgrades / failover kernels now.


Regards,

Darryl



WORKING:

# fdisk -l

Disk /dev/sda: 16.0 GB, 16013942784 bytes
255 heads, 63 sectors/track, 1946 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000760fd

    Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          16      128488+  83  Linux
/dev/sda2              17         502     3903795   83  Linux
/dev/sda3             503        1853    10851907+  83  Linux
/dev/sda4            1854        1946      747022+  82  Linux swap / Solaris


Disk /dev/sda: 16.0 GB, 16013942784 bytes
255 heads, 63 sectors/track, 1946 cylinders, total 31277232 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x000760fd

    Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63      257039      128488+  83  Linux
/dev/sda2          257040     8064629     3903795   83  Linux
/dev/sda3         8064630    29768444    10851907+  83  Linux
/dev/sda4        29768445    31262489      747022+  82  Linux swap / Solaris


Disk /dev/sda: 255 heads, 63 sectors, 1946 cylinders

Nr AF  Hd Sec  Cyl  Hd Sec  Cyl     Start      Size ID
  1 80   1   1    0 254  63   15         63     256977 83
  2 00   0   1   16 254  63  501     257040    7807590 83
  3 00   0   1  502 254  63 1023    8064630   21703815 83
  4 00 254  63 1023 254  63 1023   29768445    1494045 82




# /sbin/dumpe2fs  /dev/sda1
Filesystem volume name:   boot
Last mounted on:          <not available>
Filesystem UUID:          d4a683fb-c688-4cf7-9075-4eb22a375e73
Filesystem magic number:  0xEF53
Filesystem revision #:    1 (dynamic)
Filesystem features:      has_journal ext_attr resize_inode dir_index 
filetype sparse_super
Filesystem flags:         signed_directory_hash
Default mount options:    (none)
Filesystem state:         clean
Errors behavior:          Continue
Filesystem OS type:       Linux
Inode count:              32128
Block count:              128488
Reserved block count:     0
Free blocks:              118764
Free inodes:              32117
First block:              1
Block size:               1024
Fragment size:            1024
Reserved GDT blocks:      256
Blocks per group:         8192
Fragments per group:      8192
Inodes per group:         2008
Inode blocks per group:   251
Filesystem created:       Mon Mar  8 19:45:04 2010
Last mount time:          n/a
Last write time:          Mon Mar  8 19:45:04 2010
Mount count:              0
Maximum mount count:      20
Last checked:             Mon Mar  8 19:45:04 2010
Check interval:           15552000 (6 months)
Next check after:         Sat Sep  4 20:45:04 2010
Reserved blocks uid:      0 (user root)
Reserved blocks gid:      0 (group root)
First inode:              11
Inode size:               128
Journal inode:            8
Default directory hash:   half_md4
Directory Hash Seed:      e808e64a-0fd3-4a44-b741-e6c30a8e5c2f
Journal backup:           inode blocks
Journal size:             4113k
...SNIP..
Group 0: (Blocks 1-8192)
   Primary superblock at 1, Group descriptors at 2-2
   Reserved GDT blocks at 3-258
   Block bitmap at 259 (+258), Inode bitmap at 260 (+259)
   Inode table at 261-511 (+260)
   7667 free blocks, 1997 free inodes, 2 directories
   Free blocks: 526-8192
   Free inodes: 12-2008
....SNIP....


# /sbin/debugfs /dev/sda1
debugfs 1.41.3 (12-Oct-2008)

debugfs:  imap /
Inode 2 is part of block group 0
         located at block 261, offset 0x0080

debugfs:  bmap / 0
512

debugfs:  stat /
Inode: 2   Type: directory    Mode:  0755   Flags: 0x0
Generation: 0    Version: 0x00000000
User:     0   Group:     0   Size: 1024
File ACL: 0    Directory ACL: 0
Links: 3   Blockcount: 2
Fragment:  Address: 0    Number: 0    Size: 0
ctime: 0x4b9553c0 -- Mon Mar  8 19:45:04 2010
atime: 0x4b9553c0 -- Mon Mar  8 19:45:04 2010
mtime: 0x4b9553c0 -- Mon Mar  8 19:45:04 2010
BLOCKS:
(0):512
TOTAL: 1

debugfs:  ls /
  2  (12) .    2  (12) ..    11  (1000) lost+found


debugfs: stat /grub
Inode: 20081   Type: directory    Mode:  0755   Flags: 0x0
Generation: 2798505831    Version: 0x00000000
User:     0   Group:     0   Size: 1024
File ACL: 0    Directory ACL: 0
Links: 2   Blockcount: 2
Fragment:  Address: 0    Number: 0    Size: 0
ctime: 0x4b955df1 -- Mon Mar  8 20:28:33 2010
atime: 0x4b955df1 -- Mon Mar  8 20:28:33 2010
mtime: 0x4b954cee -- Mon Mar  8 19:15:58 2010
BLOCKS:
(0):84481
TOTAL: 1

_______________________________________________
Soekris-tech mailing list
[email protected]
http://lists.soekris.com/mailman/listinfo/soekris-tech

Reply via email to