forked from neobht/uird
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mkuird
executable file
·54 lines (46 loc) · 1.94 KB
/
mkuird
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
#!/bin/bash
echo $a
if [ $1 ] ; then
CFG=$1
else
#default uird for multy
CFG=multi
fi
if ! [ -f ./configs/uird_configs/$CFG ] ; then
echo "./configs/uird_configs/$CFG is not exist"
exit 1
fi
echo $date > ./not_found.log
cd dracut/modules.d
ln -s ../../modules.d/* ../modules.d/ 2>/dev/null
cd ../..
filesystems="aufs squashfs vfat msdos iso9660 isofs xfs fuse nfs cifs udf nls_cp866 nls_utf8 reiserfs overlay ext3 ntfs"
kernelmods="loop cryptoloop cbc zram aes-generic aes-i586 aes-x86_64 pata_acpi ata_generic ahci xhci-hcd
xhci-pci xhci-plat-hcd ohci-pci usb-storage uhci-hcd hid usbhid ehci-hcd ohci-hcd ehci-pci ehci-platform
hid-generic sr_mod sd_mod scsi_mod jbd jbd2 lockd evdev sunrpc lz4 af_packet"
FS=''
for mod in $filesystems ; do
if /sbin/modinfo $mod >/dev/null ;then
FS="$FS $mod"
else
echo "kernel module: $mod not found" >> ./not_found.log
fi
done
KM="=drivers/ide =drivers/ata =drivers/net/ethernet =drivers/usb/storage =drivers/usb/host =fs/nfs"
for mod in $kernelmods ; do
if /sbin/modinfo $mod >/dev/null ;then
KM="$KM $mod"
else
echo "kernel module: $mod not found" >> ./not_found.log
fi
done
./dracut/dracut.sh -l -N --strip -f -m "base uird uird-network ntfs kernel-modules" \
-d "$KM" \
--filesystems "$FS" \
-i initrd / \
-i configs / \
--kernel-cmdline "uird.basecfg=/uird_configs/$CFG" \
-c dracut.conf -v -M uird.$CFG.cpio.xz $(uname -r) >dracut_magos.log 2>&1
#./dracut/dracut.sh -l -N --strip -f -m "base uird uird-network ntfs kernel-modules kernel-network-modules"
# --kernel-cmdline "uird.from=/MagOS,/MagOS-Data uird.ro=*.xzm,*.rom,*.rom.enc,*.pfs,*.sfs uird.rw=*.rwm,*.rwm.enc uird.cp=*.xzm.cp,*/rootcopy uird.load=/base/,/modules/,rootcopy uird.machines=/MagOS-Data/machines uird.config=MagOS.ini" \
# -c dracut.conf -v -M uird.magos.cpio.xz 3.19.4-desktop586-2.mga5 >dracut_magos.log 2>&1