Cylinder/Head/Size Hell Is Not Over pixel@mandrakesoft.com $Date$ Nowadays, you can boot Linux without ever relying on CHS (Cylinder/Head/Size): - CHS information on partition table is obsolete and not used anymore. It was causing the 1024th cylinder limitation: - disallowing partitions above 8GiG. Problem overcome using 28bits Linear Block Addressing (LBA) in partition table. - disallowing to boot on partition above 8GiG (due to int13 limitation used in bootloaders). Problem overcome using int13 extensions (EDD) Logical CHS (Cylinder/Head/Size) and physical CHS are not related anymore. Especially the size of a hard drive is not a multiple of the number of Cylinders. The problem is that many tools still rely somewhat heavily on CHS information. - most tools adjust partitions on cylinder boundary - some tools compute the size of the disk based on CHS (eg: fdisk) Resulting problems in various tools: - last partition not cylinder boundary adjusted, and overrun CHS computed size - fdisk > Total allocated sectors %d greater than the maximum %d - cfdisk (need confirmation) > FATAL ERROR: Bad primary partition %d: Partition ends after end-of-disk or > FATAL ERROR: Bad logical partition %d: Partition ends after end-of-disk - Partition Magic (version?) > Error #109: Partition ends after end of disk - Windows <= 98se, Windows Me (doesn't like it, what error message?) Tools handling it correctly: - parted and so diskdruid in RedHat >= 7.2 (or is it 7.x?) - diskdrake >= Mandrake 8.2 - Windows XP (need confirmation) Tools using the full size of the disk, and so causing pbs with fdisk/cfdisk/...: - diskdrake == Mandrake 8.2 - disagreement between CHS and linear address - parted > "Warning: Unable to align partition properly. This probably means that > another partitioning tool generated an > incorrect partition table, because it didn't have the correct BIOS > geometry. It is safe to ignore,but > ignoring may cause (fixable) problems with some boot loaders. > Ignore Cancel ? C - lilo > Warning: Kernel & BIOS return differing head/sector geometries for device 0x80 > Kernel: 38792 cylinders, 16 heads, 63 sectors > BIOS: 1023 cylinders, 255 heads, 63 sectors > Device 0x2100: Inconsistent partition table, 2nd entry > CHS address in PT: 48:0:1 --> LBA (771120) > LBA address in PT: 48384 --> CHS (3:3:1) > The partition table is *NOT* being adjusted. ame='qt'>
path: root/sysconfig/network-scripts/ifdown-ipsec
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2003-07-02 22:37:43 +0000
committerBill Nottingham <notting@redhat.com>2003-07-02 22:37:43 +0000
commit6b78527ef407b08b4e2c26f0709375b366e66283 (patch)
tree5db9039928a64e1fd43afdc49ddec36ad2f827c0 /sysconfig/network-scripts/ifdown-ipsec
parent927f8ea11a053120ff7395de0ecf2648dadc8028 (diff)
downloadinitscripts-6b78527ef407b08b4e2c26f0709375b366e66283.tar
initscripts-6b78527ef407b08b4e2c26f0709375b366e66283.tar.gz
initscripts-6b78527ef407b08b4e2c26f0709375b366e66283.tar.bz2
initscripts-6b78527ef407b08b4e2c26f0709375b366e66283.tar.xz
initscripts-6b78527ef407b08b4e2c26f0709375b366e66283.zip
add ifdown-ipsec
Diffstat (limited to 'sysconfig/network-scripts/ifdown-ipsec')
-rwxr-xr-xsysconfig/network-scripts/ifdown-ipsec29
1 files changed, 29 insertions, 0 deletions
diff --git a/sysconfig/network-scripts/ifdown-ipsec b/sysconfig/network-scripts/ifdown-ipsec
new file mode 100755
index 00000000..d5f8ec50
--- /dev/null
+++ b/sysconfig/network-scripts/ifdown-ipsec
@@ -0,0 +1,29 @@
+#!/bin/bash
+PATH=/sbin:/usr/sbin/:/bin:/usr/bin
+
+cd /etc/sysconfig/network-scripts
+. network-functions
+
+CONFIG=$1
+[ -f "${CONFIG}" ] || CONFIG=ifcfg-${1}
+source_config
+
+if [ -z "$SRC" ]; then
+ SRC=`ip -o route get to $DST | sed "s|.*src \([^ ]*\).*|\1|"`
+fi
+
+if [ "$KEYING" = "manual" ]; then
+ setkey -c << EOF
+delete $SRC $DST ah $SPI_AH_OUT;
+delete $DST $SRC ah $SPI_AH_IN;
+delete $SRC $DST esp $SPI_ESP_OUT;
+delete $DST $SRC esp $SPI_ESP_IN;
+EOF
+fi
+
+setkey -c << EOF
+spddelete $SRC $DST any -P out;
+spddelete $DST $SRC any -P in;
+EOF
+
+/etc/sysconfig/network-scripts/ifdown-post $CONFIG