Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

reinstall/reconfigure GRUB for a new OS

Ask for help with issues regarding the Installations of the Debian O/S.
Message
Author
mzimmers
Posts: 86
Joined: 2016-12-11 23:49

Re: reinstall/reconfigure GRUB for a new OS

#21 Post by mzimmers »

I keep running into dead ends. I got some new DVDs, and I get the same error. I do notice that when I insert a blank DVD into the drive, and click on it in the files window, I get an error message:
mount: /dev/sr0 is write-protected, mounting read-only
mount: wrong fs type, bad option, bad superblock on /dev/sr0,
missing codepage or helper program, or other error

In some cases useful info is found in syslog - try
dmesg | tail or so.
So, I looked:

Code: Select all

mzimmers@debian:~$ dmesg | tail
[ 2304.226170] UDF-fs: warning (device sr0): udf_fill_super: No partition found (1)
[ 2304.242089] sr 2:0:0:0: [sr0]  
[ 2304.242091] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 2304.242092] sr 2:0:0:0: [sr0]  
[ 2304.242093] Sense Key : Illegal Request [current] 
[ 2304.242095] sr 2:0:0:0: [sr0]  
[ 2304.242096] Add. Sense: Logical block address out of range
[ 2304.242097] sr 2:0:0:0: [sr0] CDB: 
[ 2304.242098] Read(10): 28 00 00 00 00 10 00 00 01 00
[ 2304.242117] isofs_fill_super: bread failed, dev=sr0, iso_blknum=16, block=16
I don't know what to make of this (if anything).

According to this, though, the drive at least has the capability of burning:

Code: Select all

mzimmers@debian:~$ cat /proc/sys/dev/cdrom/info
CD-ROM information, Id: cdrom.c 3.20 2003/12/17

drive name:		sr0
drive speed:		24
drive # of slots:	1
Can close tray:		0
Can open tray:		1
Can lock tray:		1
Can change speed:	1
Can select disk:	0
Can read multisession:	1
Can read MCN:		1
Reports media changed:	1
Can play audio:		1
Can write CD-R:		1
Can write CD-RW:	1
Can read DVD:		1
Can write DVD-R:	1
Can write DVD-RAM:	1
Can read MRW:		0
Can write MRW:		0
Can write RAM:		1
Any suggestions? I'm trying to upload the ISO file to my dropbox so I can try burning it on my other machine (a Mac), but that's taking forever, and I'd kind of like to figure out what's going on here.

I realize this last wrinkle is off-topic of my original post, so if it's appropriate, I can start a new topic.

Thanks...

User avatar
phenest
Posts: 1702
Joined: 2010-03-09 09:38
Location: The Matrix

Re: reinstall/reconfigure GRUB for a new OS

#22 Post by phenest »

sunrat wrote:I'm not familiar with converting MBR boot to UEFI so will leave that advice to others. I've only installed Debian in full MBR (on my old system) or full UEFI with GPT partitions on my new system. Both multi-boot fine with Windows.
Because the OP has a 2nd drive that is GPT, there is no need to convert anything.
sunrat wrote:Just a couple of minor points:
phenest wrote:
mzimmers wrote:[*]I believe the partition on my Windows disk to use is the first one: /dev/sda1, (SYSTEM), 105MB, EFI. Correct?
That's correct. I believe the ESP must always be the first partition on a hard drive.
ESP does not have to be first partition. Mine is /dev/sda2.
I stand corrected.
sunrat wrote:

Code: Select all

mount /dev/sdb1 /boot/efi
apt-get install --reinstall grub-efi
grub-install /dev/sdb
update-grub
exit
Your ESP is actually /dev/sda1 on the Windows disk.
I'm guessing that once the OP has booted the DVD into rescue mode, the Debian disc will be sda and the Windows disc will be sdb.
mzimmers wrote:I keep running into dead ends. I got some new DVDs, and I get the same error.

Any suggestions? I'm trying to upload the ISO file to my dropbox so I can try burning it on my other machine (a Mac), but that's taking forever, and I'd kind of like to figure out what's going on here.

I realize this last wrinkle is off-topic of my original post, so if it's appropriate, I can start a new topic.
Can you put the ISO on a USB drive and boot from that? I'd rather help you fix one thing at a time.
ASRock H77 Pro4-M i7 3770K - 32GB RAM - Pioneer BDR-209D

mzimmers
Posts: 86
Joined: 2016-12-11 23:49

Re: reinstall/reconfigure GRUB for a new OS

#23 Post by mzimmers »

phenest wrote:
mzimmers wrote:I keep running into dead ends. I got some new DVDs, and I get the same error.
Any suggestions? I'm trying to upload the ISO file to my dropbox so I can try burning it on my other machine (a Mac), but that's taking forever, and I'd kind of like to figure out what's going on here.

I realize this last wrinkle is off-topic of my original post, so if it's appropriate, I can start a new topic.
Can you put the ISO on a USB drive and boot from that? I'd rather help you fix one thing at a time.
Yes, of course, I agree completely. I zeroed out the flash drive and performed the dd command. I now have a bootable flash drive, and can get into rescue mode. Based on earlier discussion, I wanted to review the next step with you:

1. Boot the installation ISO into Rescue mode.
OK.
2. Start a root shell into /dev/sda2 (or whatever your root partition is)
Not sure what you mean by "root partition" here.
3.

Code: Select all

mount /dev/sdb1 /boot/efi
apt-get install --reinstall grub-efi
grub-install /dev/sdb
update-grub
exit
I interpret the above as I'm installing onto a partition on my Windows disk. I believe the partition I want is /dev/sda1 (SYSTEM, 105MB, FAT). Correct?

User avatar
sunrat
Administrator
Administrator
Posts: 6412
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 462 times

Re: reinstall/reconfigure GRUB for a new OS

#24 Post by sunrat »

mzimmers wrote: 2. Start a root shell into /dev/sda2 (or whatever your root partition is)
Not sure what you mean by "root partition" here.
It's the OS partition where Debian is installed. In your first post it was /dev/sdb1.
3.

Code: Select all

mount /dev/sdb1 /boot/efi
apt-get install --reinstall grub-efi
grub-install /dev/sdb
update-grub
exit
I interpret the above as I'm installing onto a partition on my Windows disk. I believe the partition I want is /dev/sda1 (SYSTEM, 105MB, FAT). Correct?
Yes, /dev/sda1 is your ESP (EFI System Partition) in your first post. Double check these drive designations are the same before running the above commands. They can change between boots eg. your USB drive may become /dev/sda .
Assuming your Windows disk is still /dev/sda, substitute sdb for sda in the commands.

Code: Select all

mount /dev/sda1 /boot/efi
apt-get install --reinstall grub-efi
grub-install /dev/sda
update-grub
exit
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

mzimmers
Posts: 86
Joined: 2016-12-11 23:49

Re: reinstall/reconfigure GRUB for a new OS

#25 Post by mzimmers »

When I execute the first command, I get this:

Code: Select all

mount /dev/sda1 /boot/efi
mount: mount point /boot/efi does not exist
#

User avatar
sunrat
Administrator
Administrator
Posts: 6412
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 462 times

Re: reinstall/reconfigure GRUB for a new OS

#26 Post by sunrat »

Maybe install grub-efi first. I'm not sure but it could create that directory during install. Or just create the directory first. Either may work but you can't mount to a non-existent directory.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

mzimmers
Posts: 86
Joined: 2016-12-11 23:49

Re: reinstall/reconfigure GRUB for a new OS

#27 Post by mzimmers »

I performed the above steps, and grub-efi appeared to install correctly. But, there's nothing in /boot/efi, and I can't boot Windows. Any ideas?

EDIT: I did a mount /dev/sda1 /boot/efi, and now I see files in there. Still can't boot Windows, though.

EDIT2: I probably should mention that I can no longer boot Windows even if I unplug the Debian drive (this used to work). I don't mind reinstalling Windows, though I suspect the problem is in the EFI partition, so I wonder whether reinstalling Windows would help. An alternative would be to eliminate the Windows Boot Manager, as it seems somewhat redundant with GRUB. I welcome any input on these ideas.

Dai_trying
Posts: 1100
Joined: 2016-01-07 12:25
Has thanked: 5 times
Been thanked: 16 times

Re: reinstall/reconfigure GRUB for a new OS

#28 Post by Dai_trying »

Assuming you have backups of any data I would wipe both drives and start from scratch installing Windows first and then install debian afterwards (now you know it will install), and I would have both HDDs installed throughout the whole operation. I'm pretty sure your current set-up would be fixable, but I think it would be easier for you to start over as debian should install correctly on uefi with the Windows install already set-up.

User avatar
phenest
Posts: 1702
Joined: 2010-03-09 09:38
Location: The Matrix

Re: reinstall/reconfigure GRUB for a new OS

#29 Post by phenest »

mzimmers wrote:When I execute the first command, I get this:

Code: Select all

mount /dev/sda1 /boot/efi
mount: mount point /boot/efi does not exist
#
Because you're getting your drives mixed up.

Debian > /dev/sdb
Windows > /dev/sda

So...

Code: Select all

mount /dev/sdb1 /boot/efi
ASRock H77 Pro4-M i7 3770K - 32GB RAM - Pioneer BDR-209D

mzimmers
Posts: 86
Joined: 2016-12-11 23:49

Re: reinstall/reconfigure GRUB for a new OS

#30 Post by mzimmers »

Dai_trying wrote:Assuming you have backups of any data I would wipe both drives and start from scratch installing Windows first and then install debian afterwards (now you know it will install), and I would have both HDDs installed throughout the whole operation. I'm pretty sure your current set-up would be fixable, but I think it would be easier for you to start over as debian should install correctly on uefi with the Windows install already set-up.
I was thinking of this, too. As an intermediate step, how does this sound:

1. uninstall all grub and grub-efi from my Debian disk
2. tar the Debian disk to a flash drive
3. wipe the Windows disk clean
4. wipe the Debian disk clean
5. re-install Windows
6. restore the tar to the new Debian disk
7. install grub-efi

This way, I won't have to reinstall and rebuild some things on Debian. I don't have much data on the Windows disk that I need to save.

mzimmers
Posts: 86
Joined: 2016-12-11 23:49

Re: reinstall/reconfigure GRUB for a new OS

#31 Post by mzimmers »

phenest wrote:
mzimmers wrote:When I execute the first command, I get this:

Code: Select all

mount /dev/sda1 /boot/efi
mount: mount point /boot/efi does not exist
#
Because you're getting your drives mixed up.

Debian > /dev/sdb
Windows > /dev/sda

So...

Code: Select all

mount /dev/sdb1 /boot/efi
So, the complete sequence would be:

Code: Select all

mount /dev/sdb1 /boot/efi
apt-get install --reinstall grub-efi
grub-install /dev/sda
update-grub
exit
Is this what you're saying?

User avatar
sunrat
Administrator
Administrator
Posts: 6412
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 462 times

Re: reinstall/reconfigure GRUB for a new OS

#32 Post by sunrat »

phenest wrote:
mzimmers wrote:When I execute the first command, I get this:

Code: Select all

mount /dev/sda1 /boot/efi
mount: mount point /boot/efi does not exist
#
Because you're getting your drives mixed up.

Debian > /dev/sdb
Windows > /dev/sda

So...

Code: Select all

mount /dev/sdb1 /boot/efi
This is getting more confusing. Are we not trying to load Debian from the Windows ESP - sda1? Would this not require mounting ESP to /boot/efi on sdb1, the Debian partition? This would fail because /boot/efi has not been created yet if grub-efi is not installed.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

Dai_trying
Posts: 1100
Joined: 2016-01-07 12:25
Has thanked: 5 times
Been thanked: 16 times

Re: reinstall/reconfigure GRUB for a new OS

#33 Post by Dai_trying »

mzimmers wrote:I was thinking of this, too. As an intermediate step, how does this sound:

1. uninstall all grub and grub-efi from my Debian disk
2. tar the Debian disk to a flash drive
3. wipe the Windows disk clean
4. wipe the Debian disk clean
5. re-install Windows
6. restore the tar to the new Debian disk
7. install grub-efi

This way, I won't have to reinstall and rebuild some things on Debian. I don't have much data on the Windows disk that I need to save.
I'm not an expert so I cannot say for sure, but I would think you might still have similar issues as your debian install was not done "properly" as UEFI, if you re-install both OS's (as UEFI) there would be a more pristine setup from which you would have less issues.

I understand you would not want to go through the time consuming process of building some packages, but I would see it as the lesser of the two evils, start with a freshly and correctly installed system and it should lead to everything else becoming less fraught with errors that may (or may not) be connected to something you have done to try and get the system working correctly.

I'm only saying what I would do and there are people posting advice in this thread that have far more experience than myself, so you would have to do what you are happiest with.=)

HTH

User avatar
phenest
Posts: 1702
Joined: 2010-03-09 09:38
Location: The Matrix

Re: reinstall/reconfigure GRUB for a new OS

#34 Post by phenest »

It depends on what you mean by this...
mzimmers wrote:2. tar the Debian disk to a flash drive
... and this ...
mzimmers wrote:6. restore the tar to the new Debian disk
Are you referring to files or partitions or the whole disc?
ASRock H77 Pro4-M i7 3770K - 32GB RAM - Pioneer BDR-209D

mzimmers
Posts: 86
Joined: 2016-12-11 23:49

Re: reinstall/reconfigure GRUB for a new OS

#35 Post by mzimmers »

Dai: I suppose you're right. At this point, the system feels rather "grubby," and it's probably better to take my medicine and redo it. Is there any point to pre-formatting either disk, or should I let this happen during the installation?

Phenest: I was referring to the entire drive. That was why I mentioned clearing out GRUB first, to prevent any artifacts from being carried forward.

Dai_trying
Posts: 1100
Joined: 2016-01-07 12:25
Has thanked: 5 times
Been thanked: 16 times

Re: reinstall/reconfigure GRUB for a new OS

#36 Post by Dai_trying »

I usually re-format the drives and then do the installation (just in case) but I'm not really sure it would make a difference, it's just what I am used to doing.

mzimmers
Posts: 86
Joined: 2016-12-11 23:49

Re: reinstall/reconfigure GRUB for a new OS

#37 Post by mzimmers »

Dai_trying wrote:I usually re-format the drives and then do the installation (just in case) but I'm not really sure it would make a difference, it's just what I am used to doing.
What do you use to do the formatting? Obviously it can't be anything on your system disk. Can I do it from my installation flash drive?

Dai_trying
Posts: 1100
Joined: 2016-01-07 12:25
Has thanked: 5 times
Been thanked: 16 times

Re: reinstall/reconfigure GRUB for a new OS

#38 Post by Dai_trying »

I usually use live-cd's for installation so I have the tools I need to change anything before I commit to disk and would use it to make any changes. You can use any of the live-cd's from the Debian live-cd collection, I usually have the Xfce one on a thumb drive in case something goes wrong with my systems. The standard iso is only 417 Mb download in case you have bandwidth restrictions, but it has no DE so everything would have to be done via CLI.

User avatar
phenest
Posts: 1702
Joined: 2010-03-09 09:38
Location: The Matrix

Re: reinstall/reconfigure GRUB for a new OS

#39 Post by phenest »

mzimmers wrote:Phenest: I was referring to the entire drive. That was why I mentioned clearing out GRUB first, to prevent any artifacts from being carried forward.
That won't work. You going to partition the Debian disc as GPT which means your backup will be incompatible.
Dai_trying wrote:I usually re-format the drives and then do the installation (just in case) but I'm not really sure it would make a difference, it's just what I am used to doing.
In case of what?
mzimmers wrote:What do you use to do the formatting? Obviously it can't be anything on your system disk. Can I do it from my installation flash drive?
Might as well do it from the installer then. You don't save any time by pre-formatting. Formatting is done by "quick" formatting. This means that it doesn't zero the drive as it formats so it's a pretty quick process.. The same thing happens with a Windows installer.
ASRock H77 Pro4-M i7 3770K - 32GB RAM - Pioneer BDR-209D

mzimmers
Posts: 86
Joined: 2016-12-11 23:49

Re: reinstall/reconfigure GRUB for a new OS

#40 Post by mzimmers »

Here's where I am at present: I re-installed both Windows and Debian, but now both drives show partitioning for MBR. Evidently my installations overwrote the formatting I'd done before. I guess I have two questions at this point:

1. is there a bootable utility that will allow me to format both drives for GPTs?
2. what am I doing during the installations that is causing these drives to be reformatted?

Post Reply