Skip to content

Commit 872e2b0

Browse files
committed
grub diagnostics
1 parent 381808e commit 872e2b0

File tree

2 files changed

+36
-5
lines changed

2 files changed

+36
-5
lines changed

files/grub.cfg

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,13 @@ insmod part_gpt
1414
insmod ntfs
1515

1616
menuentry "Tunic Automatic Linux Installer" {
17-
echo "ISO: ${iso_path}"
18-
search --set=root --file $iso_path
17+
search --set=root --no-floppy --file $iso_path
1918
loopback loop ($root)$iso_path
2019

20+
ls
21+
ls ($root)
22+
echo "ISO: ${root} ${iso_path}"
23+
2124
echo 'Loading Linux kernel...'
2225
linux (loop)/casper/vmlinuz file=/isodevice${tunic_dir}/preseed.cfg automatic-ubiquity boot=casper iso-scan/filename=${iso_path} nomodeset toram noprompt --
2326

@@ -32,10 +35,13 @@ menuentry "Tunic Automatic Linux Installer" {
3235
}
3336

3437
menuentry "Try out Linux without install" {
35-
echo "ISO: ${iso_path}"
36-
search --set=root --file $iso_path
38+
search --set=root --no-floppy --file $iso_path
3739
loopback loop ($root)$iso_path
3840

41+
ls
42+
ls ($root)
43+
echo "ISO: ${root} ${iso_path}"
44+
3945
echo 'Loading Linux kernel...'
4046
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=${iso_path} nomodeset toram noprompt --
4147
echo 'Loading ramdisk...'

tunic.ps1

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ function downloadIso() {
222222
if ( -not (Test-Path "$iso_path") ) {
223223
$ciso = "Z:\Downloads\$iso_file"
224224
if ( Test-Path "$ciso" ) {
225+
echo 'Cached.'
225226
copy "$ciso" "$iso_path"
226227
} else {
227228
try {
@@ -1154,6 +1155,26 @@ function hideConsole() {
11541155
[Console.Window]::ShowWindow($consoleWin, 6)
11551156
}
11561157

1158+
function uninstall() {
1159+
if( !([Security.Principal.WindowsPrincipal] `
1160+
[Security.Principal.WindowsIdentity]::GetCurrent() `
1161+
).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator) ) {
1162+
echo 'Must be an Administrator'
1163+
exit 1
1164+
}
1165+
if( test-path("${global:tunic_dir}\bcd.id") ) {
1166+
$osloader = (get-content "${global:tunic_dir}\bcd.id")
1167+
bcdedit /delete "$osloader" /cleanup /f
1168+
}
1169+
$efi = "S:"
1170+
if ( -not (Test-Path "$efi") ) {
1171+
mountvol $efi /s
1172+
}
1173+
rm "${efi}\boot" -recurse -force
1174+
mountvol "$efi" /d
1175+
rm "${global:tunic_dir}" -recurse -force
1176+
}
1177+
11571178
# Installs full disk install.
11581179
# Mainly for testing purposes.
11591180
# User will have 'tunic' password.
@@ -1163,8 +1184,9 @@ function fullDisk() {
11631184
$global:data.password = 'tunic'
11641185
# copied from distros.ps1
11651186
$url = 'http://releases.ubuntu.com/18.04.3/ubuntu-18.04.3-desktop-amd64.iso'
1166-
$url = 'http://mirrors.gigenet.com/linuxmint/iso/stable/19.3/linuxmint-19.3-xfce-64bit.iso'
11671187
$url = 'http://releases.ubuntu.com/19.10/ubuntu-19.10-desktop-amd64.iso'
1188+
$url = 'http://mirrors.gigenet.com/linuxmint/iso/stable/19.3/linuxmint-19.3-xfce-64bit.iso'
1189+
$url = 'http://mirrors.gigenet.com/linuxmint/iso/stable/19.3/linuxmint-19.3-cinnamon-64bit.iso'
11681190
$global:data.iso_url = $url
11691191

11701192
if( $global:data.installType -eq $DUALBOOT ) {
@@ -1218,6 +1240,9 @@ switch($op) {
12181240
$global:form = (gui)
12191241
[void]$form.showDialog()
12201242
}
1243+
{$_ -eq "uninstall" } {
1244+
uninstall
1245+
}
12211246
default {
12221247
$global:form = (gui)
12231248
[void]$form.showDialog()

0 commit comments

Comments
 (0)