Welcome, in the previous topic (https://www.elektroda.pl/rtvforum/viewtopic.php?p=16117184) you helped me recover disk partitions, so I already have a copy of the files, now I would like to restore the system to work, then I would not have to install it from scratch and rip the data from the copy.
The current situation is as follows: I have my external drive removed, but booting the system crashes: "error: Unknown filesystem ... GRUB RESCUE> "
and now the question is whether I should fire this fat one:
a) by connecting this disk to a working computer with Windows and some program to fix this grub?
b) connect the drive to the original laptop and try, for example, this method: - ls - set boot = (hd0, msdosX) - set prefix = (hd0, msdosX) / boot / grub - insmod normal - normal
c) connect the disk to the original laptop and run Linux from the disc (I have an old version of Mint) and run some repair commands in the console?
d) Can I look for a Windows CD (if I can find it in the wardrobes) and repair it?
I had both Mint and Windows on this drive and they are still there. A few days ago, when I hadn't had these partitions repaired yet, method b) didn't work because none of the partitions were listed for me. Each returned "unknown filesystem", I do not know how now after repairing the partition, but I would like to avoid mounting the disk to the laptop and removing it again, because it is not the easiest in my model (Lenovo Z510).
I downloaded LiveUSB (https://www.pendrivelinux.com/liveusb-install-live-usb-creator/) and recorded it on a pendrive with this program: Ubuntu 16 i386. After inserting this pendrive into the laptop, it starts from it and I have a choice: 1) Start Ubuntu 2) Start Ubuntu (sae mode) 3) Start Ubuntu (disable ACPI) 4) Install Ubuntu 5) Check file system for defects 6) Memory test 7) Boot from first hard disk
Should I choose the first option (Start Ubumtu)? install bootinfoscript and give you the results? Is it possible to somehow enter the console and work with this fat right away?
Should I choose the first option (Start Ubumtu)? install bootinfoscript and give you the results? Is it possible to somehow enter the console and work with this fat right away?
Yes, you have to choose the first option, download the file, extract etc. Everything is described in the link provided.
Zawartosc pliku RESULTS.txt ponizej (jesli mam to inaczej wkleic, to dajcie znac).
Quote:
Boot Info Script 0.61 [1 April 2012]
============================= Boot Info Summary: ===============================
=> Grub2 (v1.99) is installed in the MBR of /dev/sda and looks at sector 1 of
the same hard drive for core.img. core.img is at this location and looks
in partition 112 for .
=> Syslinux MBR (4.04 and higher) is installed in the MBR of /dev/sdb.
File system: ntfs
Boot sector type: Windows Vista/7: NTFS
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files: /Windows/System32/winload.exe
File system: ntfs
Boot sector type: Windows XP: NTFS
Boot sector info: According to the info in the boot sector, sda7 starts
at sector 63. According to the info in the boot
sector, sda7 has 41943039 sectors, but according to
the info from fdisk, it has 663589832 sectors.
Operating System:
Boot files:
File system: ntfs
Boot sector type: Windows Vista/7: NTFS
Boot sector info: According to the info in the boot sector, sda8 starts
at sector 1092571136. But according to the info from
fdisk, sda8 starts at sector 1756162048. The info in
the boot sector on the starting sector of the MFT
Mirror is wrong. According to the info in the boot
sector, sda8 has 663589832 sectors, but according to
the info from fdisk, it has 39059455 sectors.
Operating System:
Boot files:
File system: vfat
Boot sector type: SYSLINUX 6.02 2013-10-13... :..(:,:0:4:8:....D:H:L:[.T:[.\:`:d:[.l:p:t:x :.:.:.:.:.:.:.:...........
Boot sector info: Syslinux looks at sector 2975920 of /dev/sdb1 for its
second stage. SYSLINUX is installed in the directory.
The integrity check of the ADV area failed. No errors
found in the Boot Parameter Block.
Operating System:
Boot files: /syslinux/syslinux.cfg /ldlinux.sys
/syslinux/ldlinux.sys
--------------------------------------------------------------------------------
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
set have_grubenv=true
load_env
fi
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="4"
fi
if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi
export menuentry_id_option
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}
function recordfail {
set recordfail=1
if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}
function load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}
if [ x$feature_default_font_path = xy ] ; then
font=unicode
else
insmod part_msdos
insmod ext2
set root='hd0,msdos7'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos7 --hint-efi=hd0,msdos7 --hint-baremetal=ahci0,msdos7 4d06dcfc-e3e3-4d35-b96a-812a9995cae7
else
search --no-floppy --fs-uuid --set=root 4d06dcfc-e3e3-4d35-b96a-812a9995cae7
fi
font="/usr/share/grub/unicode.pf2"
fi
if loadfont $font ; then
set gfxmode=auto
load_video
insmod gfxterm
set locale_dir=$prefix/locale
set lang=pl_PL
insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
set timeout=30
else
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=10
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
set timeout=10
fi
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/06_mint_theme ###
set menu_color_normal=white/black
set menu_color_highlight=white/light-gray
### END /etc/grub.d/06_mint_theme ###
### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
set gfxpayload="${1}"
if [ "${1}" = "keep" ]; then
set vt_handoff=vt.handoff=7
else
set vt_handoff=
fi
}
if [ "${recordfail}" != 1 ]; then
if [ -e ${prefix}/gfxblacklist.txt ]; then
if hwmatch ${prefix}/gfxblacklist.txt 3; then
if [ ${match} = 0 ]; then
set linux_gfx_mode=keep
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=keep
fi
else
set linux_gfx_mode=text
fi
export linux_gfx_mode
menuentry 'Linux Mint 17.2 MATE 64-bit' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-4d06dcfc-e3e3-4d35-b96a-812a9995cae7' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos7'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos7 --hint-efi=hd0,msdos7 --hint-baremetal=ahci0,msdos7 4d06dcfc-e3e3-4d35-b96a-812a9995cae7
else
search --no-floppy --fs-uuid --set=root 4d06dcfc-e3e3-4d35-b96a-812a9995cae7
fi
linux /boot/vmlinuz-3.16.0-38-generic root=UUID=4d06dcfc-e3e3-4d35-b96a-812a9995cae7 ro quiet splash $vt_handoff
initrd /boot/initrd.img-3.16.0-38-generic
}
submenu 'Advanced options for Linux Mint 17.2 MATE 64-bit' $menuentry_id_option 'gnulinux-advanced-4d06dcfc-e3e3-4d35-b96a-812a9995cae7' {
menuentry 'Linux Mint 17.2 MATE 64-bit, with Linux 3.16.0-38-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.16.0-38-generic-advanced-4d06dcfc-e3e3-4d35-b96a-812a9995cae7' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos7'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos7 --hint-efi=hd0,msdos7 --hint-baremetal=ahci0,msdos7 4d06dcfc-e3e3-4d35-b96a-812a9995cae7
else
search --no-floppy --fs-uuid --set=root 4d06dcfc-e3e3-4d35-b96a-812a9995cae7
fi
echo 'Loading Linux 3.16.0-38-generic ...'
linux /boot/vmlinuz-3.16.0-38-generic root=UUID=4d06dcfc-e3e3-4d35-b96a-812a9995cae7 ro quiet splash $vt_handoff
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-3.16.0-38-generic
}
menuentry 'Linux Mint 17.2 MATE 64-bit, with Linux 3.16.0-38-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.16.0-38-generic-recovery-4d06dcfc-e3e3-4d35-b96a-812a9995cae7' {
recordfail
load_video
insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos7'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos7 --hint-efi=hd0,msdos7 --hint-baremetal=ahci0,msdos7 4d06dcfc-e3e3-4d35-b96a-812a9995cae7
else
search --no-floppy --fs-uuid --set=root 4d06dcfc-e3e3-4d35-b96a-812a9995cae7
fi
echo 'Loading Linux 3.16.0-38-generic ...'
linux /boot/vmlinuz-3.16.0-38-generic root=UUID=4d06dcfc-e3e3-4d35-b96a-812a9995cae7 ro recovery nomodeset
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-3.16.0-38-generic
}
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/10_lupin ###
### END /etc/grub.d/10_lupin ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry 'Memory test (memtest86+)' {
insmod part_msdos
insmod ext2
set root='hd0,msdos7'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos7 --hint-efi=hd0,msdos7 --hint-baremetal=ahci0,msdos7 4d06dcfc-e3e3-4d35-b96a-812a9995cae7
else
search --no-floppy --fs-uuid --set=root 4d06dcfc-e3e3-4d35-b96a-812a9995cae7
fi
knetbsd /boot/memtest86+.elf
}
menuentry 'Memory test (memtest86+, serial console 115200)' {
insmod part_msdos
insmod ext2
set root='hd0,msdos7'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos7 --hint-efi=hd0,msdos7 --hint-baremetal=ahci0,msdos7 4d06dcfc-e3e3-4d35-b96a-812a9995cae7
else
search --no-floppy --fs-uuid --set=root 4d06dcfc-e3e3-4d35-b96a-812a9995cae7
fi
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###
### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows 7 (on /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-chain-EE5C-6E50' {
insmod part_msdos
insmod fat
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 EE5C-6E50
else
search --no-floppy --fs-uuid --set=root EE5C-6E50
fi
parttool ${root} hidden-
drivemap -s (hd0) ${root}
chainloader +1
}
set timeout_style=menu
if [ "${timeout}" = 0 ]; then
set timeout=10
fi
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/30_uefi-firmware ###
### END /etc/grub.d/30_uefi-firmware ###
### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
#
# / was on /dev/sda7 during installation
UUID=4d06dcfc-e3e3-4d35-b96a-812a9995cae7 / ext4 errors=remount-ro 0 1
# /home was on /dev/sda9 during installation
UUID=a4e912ba-5bb6-41c9-b60d-72f2e1cca07a /home ext4 defaults 0 2
# swap was on /dev/sda8 during installation
UUID=c1cd73c8-f33d-46e2-9b82-5dee2750f7ea none swap sw 0 0
--------------------------------------------------------------------------------
=================== sda9: Location of files loaded by Grub: ====================
--------------------------------------------------------------------------------
MENU TITLE Ubuntu USB BOOT MENU
DEFAULT vesamenu.c32
PROMPT 0
LABEL linux
menu label ^Start Ubuntu
kernel /casper/vmlinuz
append file=/cdrom/preseed/ubuntu.seed boot=casper initrd=/casper/initrd.lz quiet splash locale=pl_PL --
LABEL live-acpifix
menu label ^Start Ubuntu (safe mode)
kernel /casper/vmlinuz
append file=/cdrom/preseed/ubuntu.seed boot=casper initrd=/casper/initrd.lz quiet xforcevesa xforcevesa nomce nosmp noapic splash locale=pl_PL --
LABEL live-noacpi
menu label ^Start Ubuntu (disable ACPI)
kernel /casper/vmlinuz
append file=/cdrom/preseed/ubuntu.seed boot=casper initrd=/casper/initrd.lz quiet acpi=off splash locale=pl_PL --
LABEL live-install
menu label ^Install Ubuntu
kernel /casper/vmlinuz
append file=/cdrom/preseed/ubuntu.seed boot=casper only-ubiquity initrd=/casper/initrd.lz quiet splash locale=pl_PL --
LABEL check
menu label ^Check filesystem for defects
kernel /casper/vmlinuz
append boot=casper integrity-check initrd=/casper/initrd.lz quiet splash --
LABEL memtest
menu label ^Test memory
kernel /install/mt86plus
LABEL hd
menu label ^Boot from first hard disk
localboot 0xffff
append -
MENU BACKGROUND backg.png
ALLOWOPTIONS 1
timeout 150
menu color title 1;31;49 #eeff1010 #cc553333 std
menu color sel 7;37;40 #ffffffff #99660000 all
menu color border 30;44 #ffffffff #00000000 std
menu color pwdheader 31;47 #eeff1010 #20ffffff std
--------------------------------------------------------------------------------
================= sdb1: Location of files loaded by Syslinux: ==================
GiB - GB File Fragment(s)
============== sdb1: Version of COM32(R) files used by Syslinux: ===============
ldlinux.c32 : not a COM32/COM32R module
syslinux/chain.c32 : not a COM32/COM32R module
syslinux/libcom32.c32 : not a COM32/COM32R module
syslinux/libutil.c32 : not a COM32/COM32R module
syslinux/menu.c32 : not a COM32/COM32R module
syslinux/vesamenu.c32 : not a COM32/COM32R module
in the previous topic (https://www.elektroda.pl/rtvforum/viewtopic.php?p=16117184) you helped me recover disk partitions, so I already have a copy of the files, now I would like to restore the system to work, then I would not have to install it from scratch and rip the data from the copy.
How many Linux partitions did you have? Two as fstab says. Have these partitions been recovered? When you boot from livecd, do you see two linux partitions? See all the files that were on them (/ home partition)?
I suggested the sad10 partition but there is also a problem with sda8. Once this partition is seen as ntfs in addition to problems:
File system: ntfs Boot sector type: Windows Vista / 7: NTFS Boot sector info: According to the info in the boot sector, sda8 starts at sector 1092571136. But according to the info from fdisk, sda8 starts at sector 1756162048. The info in the boot sector on the starting sector of the MFT Mirror is wrong. According to the info in the boot sector, sda8 has 663589832 sectors, but according to the info from fdisk, it has 39059455 sectors. Operating System: Boot files:
How many Linux partitions did you have? Two as fstab says. Have these partitions been recovered? When you boot from livecd, do you see two linux partitions? See all the files that were on them (/ home partition)?
Yes, I think I had two, one for swap and one for data (if that's what you say). From what mati211p said, he was able to recover both windows and linux partitions. The most important thing for me is to run Windows, Linux does not need to be. Only tomorrow will I be able to start the computer, because I left the power cord at work.
namok wrote:
I suggested the sad10 partition but there is also a problem with sda8. Once this partition is seen as ntfs in addition to problems:
This sda8 partition (Ania) is the one from which my problems started, because I accidentally deleted it, but I didn't format it, because I was afraid of data blurring, and then after connecting this disk to another computer, the system saw it as FAT16.
namok wrote:
Is this partition (sda8) your / home?
I don't know what / home: / means
But the partitions that I know are (from this picture) I can deduce from the size in GB:
Clearly not everything has been recovered. You can still try to restore previous partitions (I don't know if it makes sense to first explain why the partition is seen once as ntfs and other times as linux - maybe @ mati211p could say something about it) or to clean up the disk. If you can see all your data, secure it on another medium and format all suspicious partitions.
Why should it format, what will it do? Everything is recovered ok. Only the partition layout could and was different before. The problem started before the data loss and I know what possibly caused it - a 20GB partition. If you remove it, it will probably be properly seen as sda 8 linux. But what will it do?
Right away: Let's start from the beginning. The problem concerns the Ania partition, which is an NTFS data partition.
Quote:
According to the info in the boot sector, sda8 starts at sector 1092571136. But according to the info from fdisk, sda8 starts at sector 1756162048
Here we have a contradiction according to fdisk, but the partition starts in sector 1 092 571 136. Boot sector Hidden sectors entry correct. Consider a 20GB linux partition as the correct partition # 8 in order?
Quote:
According to the info in the boot sector, sda8 has 663589832 sectors, but according to the info from fdisk, it has 39059455 sectors
And here we have more contradictory information. If sda8 is the Ania partition, it has 663,589,832 sectors - boot sector info ok. Also, again the 39059455 partition size is a 20GB linux partition starting in 1 756 162 048 sector.
Quote:
The info in the boot sector on the starting sector of the MFT Mirror is wrong.
Only here there can be a problem - no MFT mirror, or bad startup cluster.
So the description clearly shows that the sda8 that fdisk is looking for is sda9. therefore, as I wrote above. You can try to delete the empty 20GB NTFS partition. Moreover, there is no sda4. Restoring booting is possible, you need to rebuild booting Windows, skipping Linux files and partitions.
It probably exceeds my skills and knowledge in the field of Linux, so as soon as I download the second copy of the data, I am trying to format and rebuild the system from scratch Unless what I say can be achieved easily from a live cd or windows, because I do not want to remove the disk from the laptop: / Kiss. Wojtek
It probably exceeds my skills and knowledge in the field of Linux, so as soon as I download the second copy of the data, I am trying to format and rebuild the system from scratch Unless what I say can be achieved easily from a live cd or windows, because I do not want to remove the disk from the laptop: / Kiss. Wojtek
Read again and understand what I wrote in the previous post, see the page I linked.
It probably exceeds my skills and knowledge in the field of Linux, so as soon as I download the second copy of the data, I am trying to format and rebuild the system from scratch Unless what I say can be achieved easily from a live cd or windows, because I do not want to remove the disk from the laptop: / Kiss. Wojtek
Read again and understand what I wrote in the previous post, see the page I linked.
If something is good for everything, it's good for nothing. Here you need a specific solution, such as using the fixboot, fixmbr commands and changing the active partition, or something else, like here:
As far as I'm not mistaken, it is fixboot, fixmbr was for xp and not vista / w7 which can be repaired very well with the installation CD using the method described in the link.
If something is good for everything, it's good for nothing. Here you need a specific solution, such as using the fixboot, fixmbr commands and changing the active partition, or something else, like here:
I saw similar solutions, I also posted a screen earlier, how it looks for me after listing it with grub:
I saw such a video, I even proposed a similar solution in the first post here.
For me, for two partitions it returns "Filesystem is ext2":
ls (hd0, msdos9) Filesystem is ext2
and: ls (hd0, msdos8) Filesystem is ext2
I can try to fire it up, but I don't know if for msdos9 or for msdos8:
- ls - set boot = (hd0, msdos9) - set prefix = (hd0, msdos9) / boot / grub - insmod normal - normal
Although I don't think it will fix that Ania partition, or that 20GB partition that you say you could try to delete.
Because your boot files are probably 1GB FAT32 (hd0, msdos1?) - maybe that's where the problem is - you can try to find the path somehow - check the contents of the 1GB partition. Neither the Ania partition nor the 20GB partition require repair.
Because your boot files are probably 1GB FAT32 (hd0, msdos1?) - maybe that's where the problem is - you can try to find the path somehow - check the contents of the 1GB partition. Neither the Ania partition nor the 20GB partition require repair.
on a 1GB partition I have the following folders: Boot, MFGFLOW, $ RECYCLE.BIN, SRC and files: bootmgr, BOOTSEC.BAK, bootwin, COMMAND.COM, KERNEL.SYS, LICENCE.TXT, README.TXT there is something in readme.txt:
Quote:
This is a freedos system, The kernel included on the boot disks is 2026a, the freedos kernel source is src \ KE2026AS.ZIP ...
What's in Boot? Also look for the Boot directory on one of the linux partitions to see if there is one. EDIT: The system has loaded, only this is a solution at once. Now it is necessary to perform operations so that this solution is not temporary but permanent.