reinstall/reconfigure GRUB for a new OS

Help with issues regarding installation of Debian

Re: reinstall/reconfigure GRUB for a new OS

Postby phenest » 2017-04-05 20:37

Code: Select all
dd if=debian.iso of=/dev/flash_disk

A common mistake is to copy the ISO to a partition. It should be copied to the root of the flash disc, i.e. /dev/sdb and not /dev/sdb1.
NEC Spirit 550 P4 3.8GHz HT - 2GB RAM - nVidia 7600GT - Pioneer BDR-209DBK
ASUS Sabertooth P67 i7 3770K - 32GB RAM - 2x nVidia 660GTX SLI'd
User avatar
phenest
 
Posts: 1571
Joined: 2010-03-09 09:38
Location: The Matrix

Re: reinstall/reconfigure GRUB for a new OS

Postby mzimmers » 2017-04-05 21:03

phenest wrote:
Code: Select all
dd if=debian.iso of=/dev/flash_disk

A common mistake is to copy the ISO to a partition. It should be copied to the root of the flash disc, i.e. /dev/sdb and not /dev/sdb1.


OK...did the dd command and rebooted to the flash drive. Now I get a grub prompt, which I don't think is what I want. True?
mzimmers
 
Posts: 80
Joined: 2016-12-11 23:49

Re: reinstall/reconfigure GRUB for a new OS

Postby phenest » 2017-04-05 21:39

No, that's not right. But the reason is one of many.

1. Is the flash drive ok?
2. Did you download Debian successfully? MD5 sum check
3. Which ISO did you download?

I'm off to bed now.
NEC Spirit 550 P4 3.8GHz HT - 2GB RAM - nVidia 7600GT - Pioneer BDR-209DBK
ASUS Sabertooth P67 i7 3770K - 32GB RAM - 2x nVidia 660GTX SLI'd
User avatar
phenest
 
Posts: 1571
Joined: 2010-03-09 09:38
Location: The Matrix

Re: reinstall/reconfigure GRUB for a new OS

Postby mzimmers » 2017-04-05 22:00

OK, thanks. I'll play with it a little and report back anything of note.
mzimmers
 
Posts: 80
Joined: 2016-12-11 23:49

Re: reinstall/reconfigure GRUB for a new OS

Postby sunrat » 2017-04-05 22:14

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

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.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!
User avatar
sunrat
 
Posts: 1958
Joined: 2006-08-29 09:12
Location: Melbourne, Australia

Re: reinstall/reconfigure GRUB for a new OS

Postby mzimmers » 2017-04-05 22:46

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...
mzimmers
 
Posts: 80
Joined: 2016-12-11 23:49

Re: reinstall/reconfigure GRUB for a new OS

Postby phenest » 2017-04-06 20:50

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.
NEC Spirit 550 P4 3.8GHz HT - 2GB RAM - nVidia 7600GT - Pioneer BDR-209DBK
ASUS Sabertooth P67 i7 3770K - 32GB RAM - 2x nVidia 660GTX SLI'd
User avatar
phenest
 
Posts: 1571
Joined: 2010-03-09 09:38
Location: The Matrix

Re: reinstall/reconfigure GRUB for a new OS

Postby mzimmers » 2017-04-06 21:36

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?
mzimmers
 
Posts: 80
Joined: 2016-12-11 23:49

Re: reinstall/reconfigure GRUB for a new OS

Postby sunrat » 2017-04-07 01:39

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!
User avatar
sunrat
 
Posts: 1958
Joined: 2006-08-29 09:12
Location: Melbourne, Australia

Re: reinstall/reconfigure GRUB for a new OS

Postby mzimmers » 2017-04-07 01:54

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
#
mzimmers
 
Posts: 80
Joined: 2016-12-11 23:49

Re: reinstall/reconfigure GRUB for a new OS

Postby sunrat » 2017-04-07 02:33

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!
User avatar
sunrat
 
Posts: 1958
Joined: 2006-08-29 09:12
Location: Melbourne, Australia

Re: reinstall/reconfigure GRUB for a new OS

Postby mzimmers » 2017-04-07 13:25

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.
mzimmers
 
Posts: 80
Joined: 2016-12-11 23:49

Re: reinstall/reconfigure GRUB for a new OS

Postby Dai_trying » 2017-04-07 21:33

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.
Dai_trying
 
Posts: 297
Joined: 2016-01-07 12:25

Re: reinstall/reconfigure GRUB for a new OS

Postby phenest » 2017-04-07 21:47

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
NEC Spirit 550 P4 3.8GHz HT - 2GB RAM - nVidia 7600GT - Pioneer BDR-209DBK
ASUS Sabertooth P67 i7 3770K - 32GB RAM - 2x nVidia 660GTX SLI'd
User avatar
phenest
 
Posts: 1571
Joined: 2010-03-09 09:38
Location: The Matrix

Re: reinstall/reconfigure GRUB for a new OS

Postby mzimmers » 2017-04-07 23:26

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: 80
Joined: 2016-12-11 23:49

PreviousNext

Return to Installation

Who is online

Users browsing this forum: No registered users and 8 guests

fashionable