Re: [D-I] Question about setting up palo/ext2 boot partition

2007-04-21 Thread Helge Deller
On Tuesday 17 April 2007, Frans Pop wrote:
 (No need to CC me, I'm subscribed.)
 
 On Tuesday 17 April 2007 16:43, Thibaut VARENE wrote:
  Hmm, I have no problem running palo with -U on a mounted partition:
 
 Very, very strange because the README for palo says:
 The update (-U) feature is currently disabled, perhaps permanently.
 The usual method for maintaining your disk is to edit /etc/palo.conf
 and rerun palo.
 
 And it also seems disabled in the source (palo/palo.c):
 snip
 else/* update */
 {
 unsigned end = f0start + f0length;
 
 fprintf(stderr, palo -U doesn't work yet\n); exit(2);
 #if 0
 code that should implement -U
 #endif
 /snip

Hi Frans,

yes, it's not available and this has bothered me as well already.
If I understand you correctly, you already have fixed the debian-installer to 
reserve bad-blocks when the palo-partition was formatted.
All what is missing now, is that palo -U installs the bootloader into those 
reserved blocks, correct ?

Technically IMHO it shouldn't be such a big problem. 
One problem I see though is, that palo should check if the badblocks really 
were marked as such before just writing in the bootloader... ?
Maybe that's the reason it's currently disabled ?

Helge



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: [D-I] Question about setting up palo/ext2 boot partition

2007-04-21 Thread Helge Deller
On Saturday 21 April 2007, Helge Deller wrote:
 On Tuesday 17 April 2007, Frans Pop wrote:
  (No need to CC me, I'm subscribed.)
  
  On Tuesday 17 April 2007 16:43, Thibaut VARENE wrote:
   Hmm, I have no problem running palo with -U on a mounted partition:
  
  Very, very strange because the README for palo says:
  The update (-U) feature is currently disabled, perhaps permanently.
  The usual method for maintaining your disk is to edit /etc/palo.conf
  and rerun palo.
  
  And it also seems disabled in the source (palo/palo.c):
  snip
  else/* update */
  {
  unsigned end = f0start + f0length;
  
  fprintf(stderr, palo -U doesn't work yet\n); exit(2);
  #if 0
  code that should implement -U
  #endif
  /snip
 
 Hi Frans,
 
 yes, it's not available and this has bothered me as well already.
 If I understand you correctly, you already have fixed the debian-installer to 
 reserve bad-blocks when the palo-partition was formatted.
 All what is missing now, is that palo -U installs the bootloader into those 
 reserved blocks, correct ?
 
 Technically IMHO it shouldn't be such a big problem. 
 One problem I see though is, that palo should check if the badblocks really 
 were marked as such before just writing in the bootloader... ?
 Maybe that's the reason it's currently disabled ?

I think it works for Thibaut, because he used palo to format his ext3 partition.
In addition palo modified the first harddisk sector and stored the location to 
where the IPL bootloader is located.
This is missing with your modifications to the debian-partitioner/formatter and 
is why palo.c can't update.

What you would need is, that palo scans the output of  dumpe2fs:

b160:/mnt# dumpe2fs -h /dev/sda1
dumpe2fs 1.40-WIP (14-Nov-2006)
Filesystem volume name:   none
Last mounted on:  not available
Filesystem UUID:  9565ddc5-9366-4a7c-805b-09c8157498c3
Filesystem magic number:  0xEF53
Filesystem revision #:1 (dynamic)
Filesystem features:  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:  4160
Block count:  16385
Reserved block count: 829
Free blocks:  15457
Free inodes:  4149
First block:  1
Block size:   1024
Fragment size:1024
Reserved GDT blocks:  64
Blocks per group: 8192
Fragments per group:  8192
Inodes per group: 2080
Inode blocks per group:   260
Filesystem created:   Sat Apr 21 14:45:12 2007
Last mount time:  n/a
Last write time:  Sat Apr 21 14:45:12 2007
Mount count:  0
Maximum mount count:  27
Last checked: Sat Apr 21 14:45:12 2007
Check interval:   15552000 (6 months)
Next check after: Thu Oct 18 14:45:12 2007
Reserved blocks uid:  0 (user root)
Reserved blocks gid:  0 (group root)
First inode:  11
Inode size:   128
Default directory hash:   tea
Directory Hash Seed:  782c7f45-351e-43d8-ad9d-ac5b3595ac5f
Bad blocks: 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 
238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 
254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 
270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 
286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 
302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 
318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 
334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 
350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 
366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 
382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 
398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 
414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 
430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 
446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 
462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 
478, 479, 480

analyzes the Block size (1024 or higher) value and checks if the bad blocks 
are constantly growing and provides a minimum of EXT2_HOLE bytes.
Then palo would need to convert the numbers and update the f.ipl_addr and 
f.version and f.flags values (search for Updating formatted in palo.c) 
acordingly.

Does this sound right ?

Helge



Re: [D-I] Question about setting up palo/ext2 boot partition

2007-04-21 Thread Stuart Brady
On Tue, Apr 17, 2007 at 10:41:13AM -0400, Kyle McMartin wrote:
 the palo boot partition is just a regular ext2/ext3 partition, with a chunk
 of disk reserved with badblocks for the boot information, this could be
 done with mke2fs in partman the same way other flags are set (block size,
 etc.)

FWIW, I found that fsck reclaims these blocks.
-- 
Stuart Brady


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: [D-I] Question about setting up palo/ext2 boot partition

2007-04-17 Thread Frans Pop
(No need to CC me, I'm subscribed.)

On Tuesday 17 April 2007 16:41, Kyle McMartin wrote:
 the palo boot partition is just a regular ext2/ext3 partition, with a
 chunk of disk reserved with badblocks for the boot information, this
 could be done with mke2fs in partman the same way other flags are set
 (block size, etc.)

Yes, I've already got that info from the conversation on #parisc end of 
last month and implemented it. That's not where the problem is. The 
problem is in running palo.


pgpnojVDIVxxY.pgp
Description: PGP signature


Re: [D-I] Question about setting up palo/ext2 boot partition

2007-04-17 Thread Frans Pop
(No need to CC me, I'm subscribed.)

On Tuesday 17 April 2007 16:43, Thibaut VARENE wrote:
 Hmm, I have no problem running palo with -U on a mounted partition:

Very, very strange because the README for palo says:
The update (-U) feature is currently disabled, perhaps permanently.
The usual method for maintaining your disk is to edit /etc/palo.conf
and rerun palo.

And it also seems disabled in the source (palo/palo.c):
snip
else/* update */
{
unsigned end = f0start + f0length;

fprintf(stderr, palo -U doesn't work yet\n); exit(2);
#if 0
code that should implement -U
#endif
/snip


pgp9XDwkouvND.pgp
Description: PGP signature


Re: [D-I] Question about setting up palo/ext2 boot partition

2007-04-17 Thread Thibaut VARENE

On 4/17/07, Frans Pop [EMAIL PROTECTED] wrote:

I can now do the first 3 steps with /boot mounted on the palo partition.
At step 4 I run into a problem:
- it is not possible to run palo on a mounted partition
- if I unmount it and run it without '--format-as=2', the existing
  ext2 file system is lost
- if I unmount it and run it with '--format-as=2', the partition is
  formatted again and existing data is lost too

It appears that the -U option was intended for this use case, but that has
been disabled and looks to be abandoned.


Hmm, I have no problem running palo with -U on a mounted partition:

[EMAIL PROTECTED]:~$ ls /boot/
System.map-2.6.18-3-parisc64  initrd.img-2.6.18-3-parisc64-smp.bak
System.map-2.6.18-3-parisc64-smp  initrd.img.old
config-2.6.18-3-parisc64  lost+found
config-2.6.18-3-parisc64-smp  vmlinux
initrd.imgvmlinux-2.6.18-3-parisc64
initrd.img-2.6.18-3-parisc64  vmlinux-2.6.18-3-parisc64-smp
initrd.img-2.6.18-3-parisc64-smp  vmlinux.old
[EMAIL PROTECTED]:~$ sudo -s
Password:
[EMAIL PROTECTED]:~# palo
palo version 1.14 [EMAIL PROTECTED] Sat Apr  8 16:08:23 EDT 2006
ipl: addr 262144 size 36864 entry 0x0
ko 0x0 ksz 0 k64o 0x0 k64sz 0 rdo 0 rdsz 0
1/vmlinux root=/dev/sda3 initrd=1/initrd.img
[EMAIL PROTECTED]:~# umount /boot
[EMAIL PROTECTED]:~# mount /boot/
[EMAIL PROTECTED]:~# ls /boot/
System.map-2.6.18-3-parisc64  initrd.img-2.6.18-3-parisc64-smp.bak
System.map-2.6.18-3-parisc64-smp  initrd.img.old
config-2.6.18-3-parisc64  lost+found
config-2.6.18-3-parisc64-smp  vmlinux
initrd.imgvmlinux-2.6.18-3-parisc64
initrd.img-2.6.18-3-parisc64  vmlinux-2.6.18-3-parisc64-smp
initrd.img-2.6.18-3-parisc64-smp  vmlinux.old
[EMAIL PROTECTED]:~# cat /etc/palo.conf
--update-partitioned=/dev/sda
--format-as=3
--commandline=1/vmlinux root=/dev/sda3 initrd=1/initrd.img

HTH

T-Bone

--
Thibaut VARENE
http://www.parisc-linux.org/~varenet/


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



[D-I] Question about setting up palo/ext2 boot partition

2007-04-17 Thread Frans Pop
We've had several suggestions to combine the palo partition and the boot 
partition on HPPA.

The first thing that was needed for that is support in partman-palo to 
format the partition as ext2 or ext3 while reserving some area for the 
palo boot information. I have created a patch that does that. It needs 
some finishing touches, but the basic functionality is there.

I next looked into installing palo on that partition, but that is where 
things become problematic.

The normal order in D-I is:
- create, format and mount partitions
- install base system
- install kernel
- install bootloader

I can now do the first 3 steps with /boot mounted on the palo partition.
At step 4 I run into a problem:
- it is not possible to run palo on a mounted partition
- if I unmount it and run it without '--format-as=2', the existing
  ext2 file system is lost
- if I unmount it and run it with '--format-as=2', the partition is
  formatted again and existing data is lost too

It appears that the -U option was intended for this use case, but that has 
been disabled and looks to be abandoned.

A work around where the kernel etc. are only copied to /boot after running 
palo seems too much of a hack to me and would still leave users in a spot 
if they'd ever want/need to rerun palo.

Comments/suggestions welcome.

Cheers,
FJP


pgpwDQGihtIbW.pgp
Description: PGP signature


Re: [D-I] Question about setting up palo/ext2 boot partition

2007-04-17 Thread Kyle McMartin
On Tue, Apr 17, 2007 at 04:25:43PM +0200, Frans Pop wrote:


hi fjp,

the palo boot partition is just a regular ext2/ext3 partition, with a chunk
of disk reserved with badblocks for the boot information, this could be
done with mke2fs in partman the same way other flags are set (block size,
etc.)

i can pull the info out of palo src if you want.

cheers,
kyle


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]