Can't complete debian installation wizard
I'm having trouble completing the install on the debian-installer. I'm trying to do a netinstall of debian 9 onto usb. On the partition page of the install wizard, I select my USB (sdg) and a new partition is created.
After I select this new partition as the boot partition I get an error message: Code:
Partition(s) 1 on /dev/sdg have been written, but we have been unable to inform the kernel of the change, probably because it/they are in use. As a result, the old partition(s) will remain in use. You should reboot now before making further changes. I'm not using a swap partition as it's a usb. Apart from that I don't know what I need to do to complete the install. |
A web search for the error message turned up not much at all except one link regarding that same error message, in which someone asked the poster whether that partition might have been already mounted.
https://github.com/rear/rear/issues/897 |
Quote:
1. Code:
# lsblk -o name,mountpoint,label,size 2. Then I re-copied the .iso file onto the usb: Code:
# dd if=debian-9.2.1-amd64-netinst.iso of=/dev/sdg Rather than rebooting from USB to complete the install, this time I looked to see if the USB was mounted again: Code:
#lsblk -o name,mountpoint,label,size,uuid 4. I tried to delete sdg2 thinking this might be why it's not installing - but it won't delete and I get an error message: Code:
The driver descriptor says the physical block size is 2048 bytes, but Linux says it is 512 bytes. Code:
Disk /dev/sdg: 29.8 GiB, 32017047552 bytes, 62533296 sectors |
If I understand the question is that you are trying to install the operating system on the same media that contains the installer?
|
Quote:
Thank you for pointing that out. It's probably not a good idea, is it? Ok, is it better to use a second USB with debian Live so I can use the debian-installer? Or alternatively, can I write the netinstall image to USB using the dd command, then compress that USB partition with gparted (e.g sdg1), create a new target partition on USB (e.g. sdg2), and then install onto the target partition? |
Quote:
the other option seems very complex to me, but should theoretically still be possible. |
The second method would be an interesting experiment. Let us know if it works.
|
I have done many installs onto USB media with no issues, but always onto a different drive than what the installer itself is on.
No adjustments to GRUB are needed. Debian switched to using UUIDs rather than device name ages ago. |
Quote:
When trying to add a new target partition onto the usb, gparted gave an error message. It says the device can only have one primary partition. So it knows the device is a usb and not a hdd. However, I don't know how gparted will respond to an external hdd with a usb interface. |
That's because it doesn't have a partition table. You can do the same thing with a HDD, it just isn't very useful most of the time.
The limits on a USB drive with a partition table are the same as the limits on an internal HDD with a partition table. Bottom line - just don't try to do the install onto the same drive as the installer. |
It is possible to install from an iso on a flash drive to another partition on that same flash drive. I very much doubt it would work if you used dd to put the iso on the flash. I read about the "toram" option which can do this. First install Grub to the MBR of the flash pointing to an already created boot directory on that drive's first partition (doesn't have to be the first). Copy the iso file to that partition and manually create a grub.cfg file with a proper menuentry. You need the toram option on the linux line in the grub.cfg menuentry. Create a second partition using the rest of the drive.
I just did this out of curiosity and it did work although the install took over 3 hours, no idea why. I definitely would put this down as about the last option to use. This wasn't with Debian and I've never done a netinstall so I'm not sure if that would pose a problem. |
Quote:
After the failed install, the usb couldn't be partitioned with gparted. But this command got the usb working properly again: Code:
dd if=/dev/zero of=/dev/sdd bs=2048 count=32 |
Quote:
Quote:
However, afterwards an existing usb with an OS has suddenly disappeared. It's not showing up as an option on the grub boot menu. I've used 'update-grub' and it's picking up the existing OS but it's still not given as a boot option on the grub menu. If I chroot into the existing OS and run 'update-grub', will that resolve the problem? I just don't know how to use the chroot command. |
Quote:
This could mean the .iso of the distro has to be specially made for removable media rather than a hdd. Although I can't be sure. |
The reason I posted interesting was due not knowing what would happen when grub was installed to the USB. Yes the install image is a hybrid ISO.
since the drive was already partitioned I would not expect that running entirely from ram should matter. |
All times are GMT -5. The time now is 11:33 AM. |