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
Hi.
I have recently (out of boredom) played with FreeBSD and OpenBSD on my laptop, both did run pretty well but I have had problems with XFCE integration so I returned to Debian. But after installing Debian Stretch x64 from an install CD with Xfce, an error occured while installing GRUB on MBR: GRUB couldn't be installed. When this error appeared, the installer showed me a menu with options, one of them being to install LILO instead of GRUB. This worked and the system booted fine, but now I have lost the option to boot in Windows 7 (I have a dual-boot Win 7/Linux because of gaming reasons) and this LILO looks really ancient. I would like to have GRUB - I tried installing it from the installed Debian but this error appears and the installation is aborted:
grub-install /dev/sda
Installing for i386-pc platform.
grub-install: error: hostdisk//dev/sda appears to contain a ufs1 filesystem which isn't known to reserve space for DOS-style boot. Installing GRUB there could result in FILESYSTEM DESTRUCTION if valuable data is overwritten by grub-setup (--skip-fs-probe disables this check, use at your own risk).
So, I don't know what to do at this point. I searched and it seems it would be necessary to wipe out the first 10 GB or so on the HDD but this is not an option because I would lose Windows partitions and I have a lot of data there. Is there any alternative?
My laptop is an old Dell Latitude E4300.
it would be necessary to wipe out the first 10 GB or so on the HDD but this is not an option because I would lose Windows partitions and I have a lot of data there
That shouldn't be any problem, you just use the back up you made, before you started experimenting.
But after installing Debian Stretch x64 from an install CD with Xfce, an error occured while installing GRUB on MBR: GRUB couldn't be installed.
The issue is a traditional MBR boot loader, like lilo or the one OpenBSD uses installs to the first sector. The newer bootloaders, like GRUB2 and the default to FreeBSD => 10, use the first two sectors. See Rod's Book on GPT.
I dual boot Debian Stretch/OpenBSD. Basicially, install Debian First but manually partition in the Debian installer. I use 4 partitions out of habit: 1) / 2) swap 3)/home 4) OpenBSD type A6. When Installing OpenBSD, use the OpenBSD partition. See DaemonForums Dual Boot Thread for more details.
If you just want Debian with GRUB2, install gdisk from the main Debian repository and follow the procedure in Rods Books about zeroing out a GPT. You are probably aware, but I need to restate, this will wipe out your existing Debian installation and you will need to re-install.
grub-install /dev/sda
Installing for i386-pc platform.
grub-install: error: hostdisk//dev/sda appears to contain a ufs1 filesystem which isn't known to reserve space for DOS-style boot. Installing GRUB there could result in FILESYSTEM DESTRUCTION if valuable data is overwritten by grub-setup (--skip-fs-probe disables this check, use at your own risk).
As you can see, there is a UFS1 filesystem in use (somehow), or at least, they've used the BSD partitioning which is incompatible with GRUB.
Also, the OP said they tried FreeBSD which uses 2 sectors as GRUB2 does, so that doesn't explain the problem.
The OP did not go into a lot of details on the FreeBSD installation. Depending on the version, (FBSD 9.x, uses only the initial sector) and the boot loader options selected in FBSD 10.x and FBSD 11.0, a one sector MBR can be used.
As far as recovery for the OP, I would try using the Window rescue to restore the Windows installation. Then backup the Windows data before trying to dual boot anything.
Thanks to all for help. Some more details: I did have a dual-boot Win 7/Debian and as I said, tried FreeBSD and OpenBSD - in this order. Then I decided to return to Debian, thinking that reinstalling Debian would reinstall GRUB and thus restoring the initial setup. But, as you see, I was quite wrong.
Here is an output of parted:
parted --list
Model: ATA ST9120821AS (scsi)
Disk /dev/sda: 120GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 106MB 105MB primary
2 106MB 98.6GB 98.5GB primary ntfs
3 98.6GB 118GB 19.5GB primary ext4 boot
4 118GB 120GB 1974MB primary linux-swap(v1)
I did not make a backup of Windows partitions because I was foolishly thinking that I would be able to restore the setup by reinstalling GRUB. Now, when I try to acces the Windows partition in Thunar, these errors spits out:
ntfs: driver 2.1.32 [Flags: R/O MODULE].
[ 950.524281] ntfs: volume version 3.1.
[ 951.025813] ntfs: (device sda2): map_mft_record_page(): Mft record 0x11049 is corrupt. Run chkdsk.
[ 951.025820] ntfs: (device sda2): map_mft_record(): Failed with error code 5.
[ 951.025824] ntfs: (device sda2): ntfs_read_locked_inode(): Failed with error code -5. Marking corrupt inode 0x11049 as bad. Run chkdsk.
[ 960.949209] ufs: ufs was compiled with read-only support, can't be mounted as read-write
[ 960.949345] ufs: You didn't specify the type of your ufs filesystem
mount -t ufs -o ufstype=sun|sunx86|44bsd|ufs2|5xbsd|old|hp|nextstep|nextstep-cd|openstep ...
>>>WARNING<<< Wrong ufstype may corrupt your filesystem, default is ufstype=old
[ 960.971635] ufs: ufs_fill_super(): bad magic number
[ 995.767056] ntfs: volume version 3.1.
[ 996.002092] ntfs: (device sda2): map_mft_record_page(): Mft record 0x11049 is corrupt. Run chkdsk.
[ 996.002100] ntfs: (device sda2): map_mft_record(): Failed with error code 5.
[ 996.002103] ntfs: (device sda2): ntfs_read_locked_inode(): Failed with error code -5. Marking corrupt inode 0x11049 as bad. Run chkdsk.
Naron wrote:I did not make a backup of Windows partitions because...
And now you've learned that Reality doesn't care about your reason(s) for not backing up.
Welcome to why we old-timers are always telling you to backup. And to test the backup. And to keep multiple copies. And so on. We're not trying to steal your joy; we're trying to save your from your own carelessness.
Naron wrote:I did not make a backup of Windows partitions because...
And now you've learned that Reality doesn't care about your reason(s) for not backing up.
Welcome to why we old-timers are always telling you to backup. And to test the backup. And to keep multiple copies. And so on. We're not trying to steal your joy; we're trying to save your from your own carelessness.
But I have installed other Linux distributions without backing up the Windows partitions and everything was OK - I was always able to reinstall Debian (and GRUB) and restore the setup. Did not know that BSDs are so different - lesson learned now. When I installed the BSDs, I did not touch the Windows partitions, just erased the Debian partitions and installed there.
Naron wrote:But I have installed other Linux distributions without backing up the Windows partitions and everything was OK
OMG... are you really as oblivious as you sound? "Yeah, I've played Russian Roulette before and 'everything was OK.'"
Backups protect against all kinds of problems--not just PEBKAC but water leaks, lightning strikes, and the inevitable wear that affects all mechanical devices (including hard drives), to name just a few.
There is no such thing as "safely" mucking around with partition tables and MBRs. You can either learn from this experience or repeat it someday. The choice is yours.