LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Can't complete debian installation wizard (https://www.linuxquestions.org/questions/debian-26/cant-complete-debian-installation-wizard-4175616936/)

firenze465 11-03-2017 09:56 PM

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.
ERROR!!!

Does anyone know what that means?
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.

frankbell 11-03-2017 10:24 PM

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

firenze465 11-04-2017 05:55 AM

Quote:

Originally Posted by frankbell (Post 5776784)
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

I repeated my steps for install to see if the USB was mounted:

1.
Code:

# lsblk -o name,mountpoint,label,size

sdg      Debian 9.2.1 amd64n        29.8G 2017-10-13-13-09-57-00
└─sdg1                                29.8G

This shows the usb is not mounted (it's not showing a mountpoint).

2. Then I re-copied the .iso file onto the usb:

Code:

# dd if=debian-9.2.1-amd64-netinst.iso of=/dev/sdg
593920+0 records in
593920+0 records out
304087040 bytes (304 MB) copied, 56.7293 s, 5.4 MB/s

3. This seems to show the .iso file has been copied to the USB.
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

sdg              Debian 9.2.1 amd64 n  29.8G 2017-10-13-13-09-57-00
├─sdg1            Debian 9.2.1 amd64 n    290M 2017-10-13-13-09-57-00
└─sdg2                                          416K ACBB-956A

As you can see, the USB is still unmounted but a new sdg2 partition has appeared from nowhere!

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.
5. The output of fdisk -l is:
Code:

Disk /dev/sdg: 29.8 GiB, 32017047552 bytes, 62533296 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

At this point, I can't see where the problem is so I can deal with it.

michaelk 11-04-2017 07:12 AM

If I understand the question is that you are trying to install the operating system on the same media that contains the installer?

firenze465 11-04-2017 09:09 AM

Quote:

Originally Posted by michaelk (Post 5776848)
If I understand the question is that you are trying to install the operating system on the same media that contains the installer?

Yes. I just realized that's what I'm doing.
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?

ondoho 11-04-2017 09:55 AM

Quote:

Originally Posted by firenze465 (Post 5776880)
Ok, is it better to use a second USB with debian Live so I can use the debian-installer?

i have done it like this once; i had to do some grub installation adjustments in the end.

the other option seems very complex to me, but should theoretically still be possible.

michaelk 11-04-2017 10:22 AM

The second method would be an interesting experiment. Let us know if it works.

IsaacKuo 11-04-2017 11:01 AM

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.

firenze465 11-04-2017 04:23 PM

Quote:

Originally Posted by ondoho (Post 5776898)
the other option seems very complex to me, but should theoretically still be possible.

Not only is it complex but it is also impossible.
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.

IsaacKuo 11-04-2017 04:52 PM

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.

yancek 11-04-2017 05:04 PM

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.

firenze465 11-04-2017 05:22 PM

Quote:

Originally Posted by michaelk (Post 5776904)
The second method would be an interesting experiment. Let us know if it works.

Unfortunately, it hasn't worked. Installing an OS on the same media as the installer-program now sounds a little ambitious.

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
After that, I used one usb to install onto another usb and it worked fine. No hiccups.

firenze465 11-04-2017 05:36 PM

Quote:

Originally Posted by IsaacKuo (Post 5776911)
I have done many installs onto USB media with no issues, but always onto a different drive than what the installer itself is on.

Yes, that makes a lot of sense now.

Quote:

No adjustments to GRUB are needed. Debian switched to using UUIDs rather than device name ages ago.
During the OS install, I loaded grub onto the mbr of the usb.
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.

firenze465 11-04-2017 06:00 PM

Quote:

Originally Posted by yancek (Post 5777008)
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 remember someone posting that debian make 'hybrid' .iso images so they can be installed on usb or cd.
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.

michaelk 11-04-2017 06:33 PM

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.