LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 11-03-2017, 09:56 PM   #1
firenze465
Member
 
Registered: Oct 2017
Posts: 42

Rep: Reputation: Disabled
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.
 
Old 11-03-2017, 10:24 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,272
Blog Entries: 28

Rep: Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124
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
 
Old 11-04-2017, 05:55 AM   #3
firenze465
Member
 
Registered: Oct 2017
Posts: 42

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by frankbell View Post
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.
 
Old 11-04-2017, 07:12 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,592

Rep: Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880
If I understand the question is that you are trying to install the operating system on the same media that contains the installer?
 
1 members found this post helpful.
Old 11-04-2017, 09:09 AM   #5
firenze465
Member
 
Registered: Oct 2017
Posts: 42

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by michaelk View Post
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?
 
Old 11-04-2017, 09:55 AM   #6
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by firenze465 View Post
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.
 
Old 11-04-2017, 10:22 AM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,592

Rep: Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880
The second method would be an interesting experiment. Let us know if it works.
 
Old 11-04-2017, 11:01 AM   #8
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
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.

Last edited by IsaacKuo; 11-04-2017 at 11:02 AM.
 
Old 11-04-2017, 04:23 PM   #9
firenze465
Member
 
Registered: Oct 2017
Posts: 42

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
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.
 
Old 11-04-2017, 04:52 PM   #10
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
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.
 
1 members found this post helpful.
Old 11-04-2017, 05:04 PM   #11
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,444

Rep: Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474
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.

Last edited by yancek; 11-04-2017 at 05:05 PM.
 
1 members found this post helpful.
Old 11-04-2017, 05:22 PM   #12
firenze465
Member
 
Registered: Oct 2017
Posts: 42

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by michaelk View Post
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.
 
Old 11-04-2017, 05:36 PM   #13
firenze465
Member
 
Registered: Oct 2017
Posts: 42

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by IsaacKuo View Post
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.
 
Old 11-04-2017, 06:00 PM   #14
firenze465
Member
 
Registered: Oct 2017
Posts: 42

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by yancek View Post
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.
 
Old 11-04-2017, 06:33 PM   #15
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,592

Rep: Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880
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.
 
  


Reply

Tags
install to usb utility


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Debian, apt; adding larger complete DVD installation images to netinst sources.list jamison20000e Linux - Software 1 12-07-2013 02:30 PM
Do I need to complete the Debian guest installation on VM virtualbox the-cod1379 Linux - Virtualization and Cloud 9 09-26-2012 03:47 PM
Root or Bios Troubles? post Installation Wizard freakky Linux - Newbie 5 04-19-2009 08:46 AM
LXer: Complete but light Debian Desktop installation with Fluxbox LXer Syndicated Linux News 0 02-04-2008 11:30 PM
Installation wizard redbiro Linux - Software 1 04-17-2004 06:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 02:18 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration