Revision: 2757
          http://ipcop.svn.sourceforge.net/ipcop/?rev=2757&view=rev
Author:   gespinasse
Date:     2009-04-30 23:13:29 +0000 (Thu, 30 Apr 2009)

Log Message:
-----------
Fix partitionning on sparc raid1.
We need to skip first cylinder or md partition erase partition and second.b

Suppress the boot flag for sparc as it is not used there
You could boot any partition from obp with boot disk<disk number>:<part number>

Better document the rules to be used for a sun label partitionning

Modified Paths:
--------------
    ipcop/trunk/src/scripts/disk-partition

Modified: ipcop/trunk/src/scripts/disk-partition
===================================================================
--- ipcop/trunk/src/scripts/disk-partition      2009-04-30 19:38:27 UTC (rev 
2756)
+++ ipcop/trunk/src/scripts/disk-partition      2009-04-30 23:13:29 UTC (rev 
2757)
@@ -63,9 +63,7 @@
 fi
 
 # Create partitions
-# generally sector 0 contain the partition table,
-# so first partition start at sector 1
-# sparc is different
+# generally sector 0 contain the partition table, so first partition start 
after
 case "$arch" in
   x86)
        erase_partition
@@ -112,13 +110,19 @@
   sparc)
        erase_partition
        parted_call "$dev mklabel sun"
-       # '/ partition' need to be on the first partition and start at sector 0
-       parted_call "$dev mkpart ext2 0 ${root_size}MiB"
+       # 'Whole disk' partition3 is not displayed by parted print but fdisk 
show that
+       # boot flag is not needed on sun label
+       # root partition should be limited to 1GB from start of disk (see silo 
docs/README)
+       # sun partitions have to be aligned on cylinder boundaries (that's why 
we round root_size)
+       if [ x$install_type = x"raid" ]; then
+               # first cylinder can't be used in raid case as swap or md use 
the first blocks
+               # disk block 0 and 1 are used by silo to write partition and 
second.b
+               parted_call "$dev mkpart ext2 1cyl ${root_size}MiB"
+       else
+               # ext2 does not use the first blocks contrary to swap and md 
partitions
+               parted_call "$dev mkpart ext2 0 ${root_size}MiB"
+       fi
        parted_call "$dev mkpart ext2 ${root_size}MiB ${disk_size}MiB"
-       parted_call "$dev set 1 boot on"
-       # silo does not support booting from /dev/md*
-       # it require a /boot partition out of raid device
-       # http://www.mail-archive.com/[email protected]/msg00117.html
        if [ x$install_type = x"raid" ]; then
                parted_call "$dev set 1 raid on"
                parted_call "$dev set 2 raid on"
@@ -133,5 +137,5 @@
 /bin/sync
 /usr/bin/partprobe $dev
 # still look needed
-# or I curiously had an error during file system creation
+# or I curiously had an error during second file system creation (/var/log)
 sleep 1


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance & Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
Ipcop-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ipcop-svn

Reply via email to