left4taco
May 11th, 2019, 01:05 AM
I need to install ubuntu on multiple machines so preseed would be very useful.
Here's the grub item that I would like to add,
menuentry "DANGER! This will reprovision you machine" { set gfxpayload=keep
echo "Please enter your device type(desktop, spectra):"
read device
echo ""
echo "Please enter the hosename of the new machine:"
read hn
linux /casper/vmlinuz url=http://x.x.x.x:5000/preseed/$device/$hn boot=casper debian-installer/locale=en_US keyboard-configuration/layoutcode=us ubiquity/reboot=true languagechooser/language-name=English countrychooser/shortlist=US localechooser/supported-locales=en_US.UTF-8 automatic-ubiquity quiet splash noprompt noshell ---
initrd /casper/initrd
}
However, after I followed the official tutorial of creating bootable usb stick, it's always write protected which means I can only mount it as readonly. The partition table is like:
sdb 8:16 1 29.3G 0 disk
├─sdb2 8:18 1 2.4M 0 part
└─sdb1 8:17 1 1.6G 0 part
So in this case, how can I create a bootable usb stick while being able to copy files to it?
========
Solved. Format the disk to FAT and copy everything from ISO. It's now both bootable and writable.
Here's the grub item that I would like to add,
menuentry "DANGER! This will reprovision you machine" { set gfxpayload=keep
echo "Please enter your device type(desktop, spectra):"
read device
echo ""
echo "Please enter the hosename of the new machine:"
read hn
linux /casper/vmlinuz url=http://x.x.x.x:5000/preseed/$device/$hn boot=casper debian-installer/locale=en_US keyboard-configuration/layoutcode=us ubiquity/reboot=true languagechooser/language-name=English countrychooser/shortlist=US localechooser/supported-locales=en_US.UTF-8 automatic-ubiquity quiet splash noprompt noshell ---
initrd /casper/initrd
}
However, after I followed the official tutorial of creating bootable usb stick, it's always write protected which means I can only mount it as readonly. The partition table is like:
sdb 8:16 1 29.3G 0 disk
├─sdb2 8:18 1 2.4M 0 part
└─sdb1 8:17 1 1.6G 0 part
So in this case, how can I create a bootable usb stick while being able to copy files to it?
========
Solved. Format the disk to FAT and copy everything from ISO. It's now both bootable and writable.