aboutsummaryrefslogtreecommitdiffstats
path: root/create_dual.sh
blob: 410467c60dc9e14d698c1581e453f7b34d09452e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
#!/bin/sh

DISTRIB=mandriva-linux-free
TAG=farman
VERSION=2010-spring
VV=2010.1
MEDIAMAIN=media/main
PIECES=/mnt/pieces/pieces/
BUILDPATH="$HOME/build_bcd/build/$DISTRIB-$VERSION"
BUILDISOPATH="$HOME/build_bcd/iso/$DISTRIB-$VERSION"

# genisoimage options
AGENISO="$DISTRIB - 2010 Spring (Free)"
PUBLISHER="Mandriva"
SYSID="$PUBLISHER Linux"
TOOL="$SYSID BCD"
VOLSET="$SYSID 2010 Spring (Free) - DUAL CD"
VOLUME="FREE-2010S-DUAL"


./bcd.pl dual.xml all copy noiso nodoble
./bcd.pl dual64.xml all copy noiso nodoble

rm -vf $BUILDPATH-i586/i586/install/images/boot.iso
rm -rvf $BUILDPATH-i586/i586/install/images/alternatives
rm -vf $BUILDPATH-x86_64/x86_64/install/images/boot.iso
rm -vrf $BUILDPATH-x86_64/x86_64/install/images/alternatives

sync

du -sh $BUILDPATH-i586/i586
du -sh $BUILDPATH-x86_64/x86_64

rm -rf $BUILDPATH
rm -rvf $BUILDISOPATH
mkdir -p $BUILDPATH
mkdir -p $BUILDISOPATH

cp -af $BUILDPATH-i586/i586 $BUILDPATH
cp -af $BUILDPATH-x86_64/x86_64 $BUILDPATH

cp -af $PIECES/$VV/i586/dosutils $BUILDPATH
cp -af $PIECES/$VV/i586/autorun.inf $BUILDPATH

cd $BUILDPATH/x86_64/$MEDIAMAIN


for i in *noarch.rpm
do
	if [ -f "../../../i586/$MEDIAMAIN/$i" ];then
		echo $i
		echo "erase package $i"
		rm -vf $i
		echo "link with the i586 one"
		ln -sf ../../../i586/$MEDIAMAIN/$i .
	else
		echo "no ../../../i586/$MEDIAMAIN/$i package"
	fi
done

cat >> $BUILDPATH/i586/isolinux/isolinux.cfg <<EOF
label harddisk64
  localboot 0x80
label linux64
  kernel /x86_64/isolinux/alt0/vmlinuz
  append initrd=/x86_64/isolinux/alt0/all.rdz automatic=method:cdrom vga=788 splash=silent
label vgalo64
  kernel /x86_64/isolinux/alt0/vmlinuz
  append initrd=/x86_64/isolinux/alt0/all.rdz automatic=method:cdrom vga=785
label vgahi64
  kernel /x86_64/isolinux/alt0/vmlinuz
  append initrd=/x86_64/isolinux/alt0/all.rdz automatic=method:cdrom vga=791
label text64
  kernel /x86_64/isolinux/alt0/vmlinuz
  append initrd=/x86_64/isolinux/alt0/all.rdz automatic=method:cdrom text
label rescue64
  kernel /x86_64/isolinux/alt0/vmlinuz
  append initrd=/x86_64/isolinux/alt0/all.rdz automatic=method:cdrom rescue
label noacpi64
  kernel /x86_64/isolinux/alt0/vmlinuz
  append initrd=/x86_64/isolinux/alt0/all.rdz automatic=method:cdrom vga=788 splash=silent acpi=off
label hdt64
  kernel /x86_64/isolinux/hdt.c32
  append modules=modules.pci
label alt064
  kernel /x86_64/isolinux/alt0/vmlinuz
  append initrd=/x86_64/isolinux/alt0/all.rdz vga=788 splash=silent
label alt164
  kernel /x86_64/isolinux/alt1/vmlinuz
  append initrd=/x86_64/isolinux/alt1/all.rdz vga=788 splash=silent
label memtest64
  kernel memtest
EOF

#cp -avf $HOME/bcd/compssUsers.pl $HOME/build_bcd/build/mandriva-linux-free-dual-$TAG-$VERSION/i586/media/media_info/compssUsers.pl
#cp -avf $HOME/bcd/compssUsers.pl $HOME/build_bcd/build/mandriva-linux-free-dual-$TAG-$VERSION/x86_64/media/media_info/compssUsers.pl
cat $BUILDPATH-i586/i586/pkg-$VERSION-$TAG.idx >> $BUILDPATH/$DISTRIB-$VERSION-dual.idx
cat $BUILDPATH-x86_64/x86_64/pkg-$VERSION-$TAG.idx >> $BUILDPATH/$DISTRIB-$VERSION-dual.idx

genisoimage -f -r -J -hide-rr-moved -nobak -cache-inodes -no-emul-boot -boot-load-size 4  \
	-A "$AGENISO"
	-publisher "$PUBLISHER" \
	-sysid "$SYSID" \
	-p "$TOOL" \
	-volset "$VOLSET" \
	-V "$VOLUME" \
	-o "$BUILDPATH/$DISTRIB-dual.iso" \
	-b i586/isolinux/isolinux.bin \
	-boot-info-table \
	-quiet \
	$BUILDPATH/

du -sh $BUILDPATH/$DISTRIB-$VERSION-dual.iso
echo "$BUILDPATH/$DISTRIB-$VERSION-dual.idx"
cd $BUILDPATH/
isohybrid -fatfirst $BUILDPATH/$DISTRIB-$VERSION-dual.iso
cp $BUILDPATH/$DISTRIB-$VERSION-dual.idx .
md5sum $DISTRIB-$VERSION-dual.iso > $DISTRIB-$VERSION-dual.iso.md5
sha1sum $DISTRIB-$VERSION-dual.iso > $DISTRIB-$VERSION-dual.iso.sha1