File: otheros.sh

package info (click to toggle)
grub-installer 1.213
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,020 kB
  • sloc: sh: 1,334; ansic: 128; makefile: 16
file content (87 lines) | stat: -rw-r--r-- 2,179 bytes parent folder | download | duplicates (2)
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
grub2_write_chain() {
	uuid="$($chroot $ROOT grub-probe --target fs_uuid --device $partition)"
	cat >> $tmpfile <<EOF

# This entry automatically added by the Debian installer for a non-linux OS
# on $partition
menuentry "$title" {
	set root=$grubdrive
EOF
	if [ -n "$uuid" ] ; then
		cat >> $tmpfile <<EOF
	search $no_floppy --fs-uuid --set=root $uuid
EOF
	fi
	# DOS/Windows can't deal with booting from a non-first hard drive
	case $shortname in
	    MS*|Win*)
		if $chroot $ROOT dpkg --compare-versions $grub_debian_version gt 1.96+20090609-1 && \
		  [ "$title" != "Windows Vista (loader)" ]; then
			    cat >> $tmpfile <<EOF
	drivemap -s (hd0) \$root
EOF
		fi
		;;
	    esac
	cat >> $tmpfile <<EOF
	chainloader +1
}
EOF

} # grub2_write_chain end

grub2_write_linux() {
	cat >> $tmpfile <<EOF

# This entry automatically added by the Debian installer for an existing
# linux installation on $mappedpartition.
menuentry "$label (on $mappedpartition)" {
	set root=$grubdrive
EOF
	uuid="$($chroot $ROOT grub-probe --target fs_uuid --device $partition)"
	if [ -n "$uuid" ] ; then
		cat >> $tmpfile <<EOF
	search $no_floppy --fs-uuid --set=root $uuid
EOF
	fi
	cat >> $tmpfile <<EOF
	linux $kernel $params
EOF
	if [ -n "$initrd" ]; then
		cat >> $tmpfile <<EOF
	initrd $initrd
EOF
	fi
	cat >> $tmpfile <<EOF
}

EOF
} # grub2_write_linux end

grub2_write_hurd() {
	cat >> $tmpfile <<EOF

# This entry automatically added by the Debian installer for an existing
# hurd installation on $partition.
menuentry "$title (on $partition)" {
	set root=$grubdrive
EOF
	uuid="$($chroot $ROOT grub-probe --target fs_uuid --device $partition)"
	if [ -n "$uuid" ] ; then
		cat >> $tmpfile <<EOF
	search $no_floppy --fs-uuid --set=root $uuid
EOF
	fi
	cat >> $tmpfile <<EOF
	multiboot /boot/gnumach.gz root=device:$hurddrive
	module /hurd/ext2fs.static ext2fs --readonly \\
			--multiboot-command-line=\${kernel-command-line} \\
			--host-priv-port=\${host-port} \\
			--device-master-port=\${device-port} \\
			--exec-server-task=\${exec-task} -T typed \${root} \\
			\$(task-create) \$(task-resume)
	module /lib/ld.so.1 exec /hurd/exec \$(exec-task=task-create)
}

EOF
} # grub2_write_hurd end