Tricky situation with re-installing windows and Grub


Recommended Posts

Okay, I have to re-install windows for a cousin, however he has 2 different Linux installations and they both are in middle partitions, not the primary ones. For example :

Hard Disk 1 ----> /Sda1 (windows) /Sda2 (linux) /Sda3 (Data)

Hard Disk 2 ----> Sdb1 (data) / Sdb2 (Linux) /Sdb3 (Data)

Now, Grub is installed onto Sda1 according to him and he's not sure where Grub is for the 2nd installation. It's definitely not (?) in the primary Sdb1 partition because it doesn't boot when I detach Sda and boot with just Sdb attached. Actually I get thrown to a 'Grub-rescue' prompt with a couple other messages that I can't recollect atm, I'm not at the machine.

Does this mean Grub is, in fact, also installed on Sdb for the 2nd Linux install he did? If yes, how can I get Grub to 'see' the Linux installation on /Sdb2? He doesn't have any /boot or /swap for either.

And how do I repair Grub on Sda1 after I reinstall Windows for him? I'm kinda lost to be honest, but I'm willing to touch it _only_ if I can fix it for him... because I just don't have the time to give if it ends up borking both Linux installations. He wants both installations, and preferably be able to boot both individually with their own Grub.

I hope I've explained it clear enough, I need help :p

After you install Windows and remove GRUB from the MBR, use Super Grub2 Disk to boot from the Linux installation on the secondary hard drive and reinstall GRUB. The command should look something like the following, assuming the drive is /dev/sdb:


sudo grub-install /dev/sdb
[/CODE]

You should now be able to boot GRUB from that hard drive if it is set as primary in BIOS. Next, use Super Grub2 Disk again to boot from the Linux installation on the hard drive with Windows. You can reinstall GRUB using a similar command to the one you used previously; just reference the other hard drive. The command should look something like the following, assuming the drive is /dev/sda:

[CODE]
sudo grub-install /dev/sda
[/CODE]

If yes, how can I get Grub to 'see' the Linux installation on /Sdb2? He doesn't have any /boot or /swap for either.

You only need one grub (bootloader) installed in the MBR of the first disk (as setup in bios), the VBR (volume boot record) will take care of the rest. As far as getting grub to see additional distros goes, it should be as simple as:

grub-mkconfig -o /boot/grub/grub.cfg

Assuming you're using Grub2. For Grub 1, you'll have to edit grub.cfg by hand or pehaps use something like os-prober.

And how do I repair Grub on Sda1 after I reinstall Windows for him? I'm kinda lost to be honest, but I'm willing to touch it _only_ if I can fix it for him... because I just don't have the time to give if it ends up borking both Linux installations. He wants both installations, and preferably be able to boot both individually with their own Grub.

Load up a live cd / usb pen with the same architecture (32/64 bit) as the installation (important!), then chroot into the installation:

# change sda1 to your linux partition
mount /dev/sda1 /mnt

# mount temporary file systems in preparation for chroot
mount -t proc proc /mnt/proc
mount -t sysfs sys /mnt/sys
mount -o bind /dev /mnt/dev
mount -t devpts pts /mnt/dev/pts

chroot /mnt /bin/bash

# restore grub
grub-install /dev/sda

That's what I do anyway.

  • Like 2

^ Thanks for the detailed breakdown bro, I'll be printing this page and taking it across to refer :)

I manage to take good care of my own Linux install, but this Triple installation (Windows, Linux, Linux) with a messy disk structure is kinda throwing me off. I'm going there tonight, will update the thread when I get back.

Cheers!

To add to what simplezz said, booting from a live disc and using a chroot to recover your GRUB installation would certainly work (and is, in fact, the method that most distribution's installers use to install from disc in the first place), but is merely an alternative to my method of booting into each OS installation. The main advantage of simplezz's solution over mine is that you can update both installations at once (or only do one or the other, as simplezz suggested).

Also, if you are using Debian or a Debian-based distribution (such as Ubuntu or Linux Mint), the distribution provides scripts that probe for existing OS installations and add them to the boot menu. (These scripts are called every time there is a kernel update and will overwrite your grub.cfg, including any custom modifications you have made. If you want to add custom boot entries, place them in /boot/grub/custom.cfg instead.) Once you are in the chroot or booted into the OS installation, use

sudo update-grub[/CODE]

instead of

[CODE]sudo mkconfig -o /boot/grub/grub.cfg[/CODE]

.

Assuming you're using Grub2. For Grub 1, you'll have to edit grub.cfg by hand or pehaps use something like os-prober.

I believe that GRUB Legacy uses [i]/boot/grub/menu.lst[/i] by default instead of [i]/boot/grub/grub.cfg[/i] like GRUB 2. However, unless your distribution is rather old (like Debian Lenny or CentOS 5), it should have shipped with GRUB 2 instead of GRUB Legacy, so my correction is probably irrelevant.

You only need one grub (bootloader) installed in the MBR of the first disk (as setup in bios), the VBR (volume boot record) will take care of the rest. As far as getting grub to see additional distros goes, it should be as simple as:

grub-mkconfig -o /boot/grub/grub.cfg

Assuming you're using Grub2. For Grub 1, you'll have to edit grub.cfg by hand or pehaps use something like os-prober.

Load up a live cd / usb pen with the same architecture (32/64 bit) as the installation (important!), then chroot into the installation:

# change sda1 to your linux partition
mount /dev/sda1 /mnt

# mount temporary file systems in preparation for chroot
mount -t proc proc /mnt/proc
mount -t sysfs sys /mnt/sys
mount -o bind /dev /mnt/dev
mount -t devpts pts /mnt/dev/pts

chroot /mnt /bin/bash

# restore grub
grub-install /dev/sda

That's what I do anyway.

To add to what simplezz said, booting from a live disc and using a chroot to recover your GRUB installation would certainly work (and is, in fact, the method that most distribution's installers use to install from disc in the first place), but is merely an alternative to my method of booting into each OS installation. The main advantage of simplezz's solution over mine is that you can update both installations at once (or only do one or the other, as simplezz suggested).

Also, if you are using Debian or a Debian-based distribution (such as Ubuntu or Linux Mint), the distribution provides scripts that probe for existing OS installations and add them to the boot menu. (These scripts are called every time there is a kernel update and will overwrite your grub.cfg, including any custom modifications you have made. If you want to add custom boot entries, place them in /boot/grub/custom.cfg instead.) Once you are in the chroot or booted into the OS installation, use

sudo update-grub[/CODE]

instead of

[CODE]sudo mkconfig -o /boot/grub/grub.cfg[/CODE]

.

I believe that GRUB Legacy uses [i]/boot/grub/menu.lst[/i] by default instead of [i]/boot/grub/grub.cfg[/i] like GRUB 2. However, unless your distribution is rather old (like Debian Lenny or CentOS 5), it should have shipped with GRUB 2 instead of GRUB Legacy, so my correction is probably irrelevant.

I'm back, and it was very .....easy, thanks to both of you's detailed instructions! Way easier than I had thought it would be :p

Before I reinstalled Windows, I decided to try and boot each hard disk on it's own to see how it goes - and surprisingly this time the 2nd hard disk booted his 2nd Linux install without a hitch. Not sure why it hadn't worked the first time I tried it. I proceeded to reinstall Windows onto his 1st hard disk, and followed simplezz's instructions to get Grub back on his HDD 1. Windows wasn't available as an option until I booted into Linux and did 'sudo update-grub' as xorangekiller said.

That was it, both Linux installs are now bootable and both disks can be booted individually.... mission accomplished! :D

Thanks for reporting back. Glad to hear that everything went well. Learning something new is always a good thing (especially if it turns out to be easier than you anticipated).

Indeed my friend, and thanks once again to your and simplezz's instructions. They were perfect - that was all I needed to do! :)

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • The Light of Life? We actually do glow till our Death, study finds by Sayan Sen Image by Rafael Rendon via Pexels A study by researchers at the University of Calgary has found that living organisms produce an extremely faint light known as ultraweak photon emission, and that this glow appears to drop significantly after death. The research was published in the Journal of Physical Chemistry in April 2025 and quickly drew widespread attention, leading to more than 200 news stories about the findings. Ultraweak photon emission (or UPE), sometimes called biophoton emission, refers to tiny amounts of light released by living cells as a result of normal biological activity. A photon is the basic particle of light, and researchers say every living system examined so far, including plants and animals, has been found to emit these photons. The glow is far too faint to be seen by the human eye. “I suppose it has a little to do with people being reminded of auras,” says Dr. Christoph Simon, PhD, one of the authors of the study and a professor in the Department of Physics and Astronomy in the Faculty of Science. “It is a fact that living beings glow. It’s a very weak glow, but it’s there and visible with very sensitive cameras.” According to the study, the light involved is extremely weak, ranging from 10 to 1,000 photons per square centimetre per second across a spectral range of 200 to 1,000 nanometres. For comparison, a nanometre is one-billionth of a metre and is commonly used to measure wavelengths of light. Detecting emissions at such low levels requires highly specialized equipment. To study the phenomenon, researchers used electron-multiplying charge-coupled device (EMCCD) and charge-coupled device (CCD) cameras. These imaging systems are designed to detect extremely small amounts of light, including individual photons, while minimizing background noise. The technology allowed researchers to capture signals that would otherwise be impossible to observe. The team worked with the Human Health Therapeutics Research Centre at the National Research Council of Canada (NRC) in Ottawa to examine photon emissions in mice. Researchers took two-hour exposure images of the animals before and after death and compared the results. “We saw that the level of light that they emit – this biophoton glow – is distinctly different between living and dead animals,” says Dr. Daniel Oblak, PhD, an associate professor in Physics and Astronomy and the corresponding author of the study. The images showed a clear decrease in photon emissions after death across the entire body of each mouse. According to the researchers, this provided direct evidence that living and dead tissue produce different levels of ultraweak photon emission. “It’s a very small amount and it’s, of course, very tricky to detect,” Oblak says. The study grew out of discussions between Simon, whose research interests include quantum biology, and Oblak, whose work focuses on detecting light for quantum communication experiments. Quantum biology is a field that explores whether processes described by quantum physics, which studies matter and energy at very small scales, may also play a role in living systems. “Since I work as a quantum physicist on light detection for quantum communication, I thought that experimentally we have a lot of the tools to be able to detect the light,” Oblak explains. The researchers also investigated UPE in plants and found that the light changed in response to stress. When plants were exposed to higher temperatures or physically injured, their photon emissions increased. Chemical treatments also affected the glow. Among the substances tested, the local anesthetic benzocaine produced the strongest emission response when applied to injured plant tissue. These findings suggest that ultraweak photon emission is closely linked to biochemical and metabolic activity inside living organisms. Metabolism refers to the chemical reactions that allow cells and organisms to stay alive and function. Because these reactions change when an organism experiences stress, injury or disease, researchers believe UPE may provide a way to monitor those changes. The researchers stress that the glow is a physical and biological phenomenon, not a metaphysical one. Oblak says more research is needed to understand exactly how the light is produced and what information it may reveal about the condition of living tissue. “We must understand what that is to figure out what’s happening,” he says. “If we can understand how that relates to certain influences on the body – stress, diseases – then that could be used as a diagnostic tool.” The researchers believe the technique could eventually help scientists study health and disease without invasive procedures. Because UPE can be measured without adding dyes, markers or labels, it may offer a way to monitor whether tissue is healthy, damaged or alive. In plants, it could help researchers better understand how organisms respond to injury, heat and other forms of stress. While the work is still in its early stages, the study demonstrates that ultraweak photon emission imaging can provide a non-invasive and label-free way to observe biological activity. Researchers say the approach could become a useful tool for studying vitality, stress responses and other important processes in both animals and plants. Source: University of Calgary, ACS publication This article was generated with some help from AI and reviewed by an editor. Under Section 107 of the Copyright Act 1976, this material is used for the purpose of news reporting. Fair use is a use permitted by copyright statute that might otherwise be infringing.
    • Damn, I loved this show back in the day.  
    • Rufus 4.15.2393 Beta 2 by Razvan Serea Rufus is a small utility that helps format and create bootable USB flash drives, such as USB keys/pendrives, memory sticks, etc. Despite its small size, Rufus provides everything you need! Oh, and Rufus is fast. For instance it's about twice as fast as UNetbootin, Universal USB Installer or Windows 7 USB download tool, on the creation of a Windows 7 USB installation drive from an ISO (with honorable mention to WiNToBootic for managing to keep up). It is also marginally faster on the creation of Linux bootable USBs from ISOs. A non-exhaustive list of Rufus supported ISOs is available here. It can be especially useful for cases where: you need to create USB installation media from bootable ISOs (Windows, Linux, UEFI, etc.) you need to work on a system that doesn't have an OS installed you need to flash a BIOS or other firmware from DOS you want to run a low-level utility Rufus 4.15.2393 Beta 2 changelog: Add RISC-V 64 support to UEFI:NTFS Improve the guards for using the "silent" option Improve the ability to cancel during write retries Improve progress reporting for compressed image extraction Fix unrestricted XML entity expansion and integer overflow in ezxml parser (courtesy of @esadowski4) [GHSA-55r2-34wg-8mv9] Fix "silent" Windows installation failing at 75% in most cases [#2960] Fix a crash during boot when using UEFI:NTFS on Snapdragon X based ARM64 platforms [#2934] Fix the first WUE option always being checked by default [#2965] Fix an infinite loop when using Windows ISOs that contain multiple WIMs Fix "Enable runtime UEFI media validation" checkbox not always being properly enabled Other WUE improvements/fixes for OneDrive removal and username validation (with thanks to @christian8641) [#2984, #2991] Download: Rufus 4.15 Beta 2 | 1.9 MB (Open Source) Links: Rufus Home Page | Project Page @GitHub | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • Tixati 3.43 by Razvan Serea Tixati is a free and easy to use BitTorrent client featuring detailed views of all seed, peer, and file transfer properties. Also included are powerful bandwidth charting and throttling capabilities, and a full DHT implementation. Tixati is one of the most advanced and flexible BitTorrent clients available. And unlike many other clients, Tixati contains NO SPYWARE, NO ADS, and NO GIMMICKS. Tixati portable version is meant to run on a USB flash drive or other portable media. It stores all its configuration files in the same folder as the executable binary files, and all file paths are stored in a format relative to the program executable folder. It is important you do not delete the "tixati_portable_mode.txt" file within the executables folder. This file is what triggers Tixati to run in portable mode. (The executable binaries are actually the same as the standard edition binaries.) When running the portable edition from a USB flash drive, especially one that is formatted in FAT16/FAT32, you may experience some lag when initially loading a new transfer. This is because initializing and allocating large files on flash-based media consumes a greater amount of time and resources compared to a conventional hard-drive. Tixati has the following features: detailed views of all aspects of the swarm, including peers, pieces, files, and trackers support for magnet links, so no need to download .torrent files if a simple magnet-link is available super-efficient peer choking/unchoking algorithms ensure the fastest downloads peer connection encryption for added security full DHT (Distributed Hash Table) implementation for trackerless torrents, including detailed message traffic graphs and customizable event logging advanced bandwidth charting of overall traffic and per-transfer traffic, with separate classification of protocol and file bytes, and with separate classification of outbound traffic for trading and seeding highly flexible bandwidth throttling, including trading/seeding proportion adjustment and adjustable priority for individual transfers and peers bitfield graphs that show the completeness of all downloaded files, what pieces other peers have available, and the health of the overall swarm customizable event logging for each download, and individual event logs for all peers within the swarm expert local file management functions which allow you to move files to a different partition even while downloading is still in progress 100% compatible with the BitTorrent protocol Windows and Linux-GTK native versions available Tixati 3.43 changelog: Several major DHT improvements Added several screening heuristics to filter malicious DHT nodes, prevent Sybil floods Rewrote DHT search algorithms to add support for multi-path lookups Improved DHT logging, more details in several error messages Extended timeout lengths for outgoing queries over I2P Added incoming query / response per second to DHT table status display Updated Regex engine to PCRE2 Faster Search function, scans channel user profiles in much less time Fixed problems with file name parsing and date handling in RSS Faster and more accurate RSS filtering and episode number detection Several optimizations to global text processing functions, such as UTF-8 cleaning, line splitting, and token parsing Complete update of port-mapping UPNP/NAT-PMP engine, added PCP support, mapping over VPN support, and more Several refinements to default gateway detection on Windows / Android, which is used for port-mapping Support for IPv6 interface-scoped addresses, which is sometimes needed for IPv6 gateway detection and port mapping Full support for PCP port remapping, added backup zero-port query in case requested port is rejected New UPNP/NAT-PMP Monitor in Help > Diagnostics New reflected local port/location tracker that analyzes DHT replies to detect true port/location and NAT mapping type New TCP/UDP Ports monitor in Help > Diagnostics, with several statistic and information tabs, and a detailed event log Calculated/reflected local port is now used for port parameter in tracker queries and peer handshake Fixed several problems with Linux Wayland compatibility Completely replaced tray icon functions in Linux, new SNI implementation is now the default with GSI backup Implemented full DBus-Menu server to be used by new SNI tray icon implementation Replaced Linux tray balloon notification DBus client Rewrote auto-shutdown DBus interface for Linux Rewrote sleep inhibit DBus interface for Linux Dropped deprecated Linux dbus-glib dependencies Completely new Windows asynchronous file handling, now using IOCP model with several block-alignment optimizations Better handling of system network resets and interface down/up cycles Added option to fully clear configuration in Settings > Import/Export Remember last option checkboxes when using Import/Export Fixed minor I2P incoming connection routing problems Much faster I2P vanity host name finder Much faster channel user vanity key finder Raised length limit for torrent tracker remote failure messages to 120 from 64 Fixed problems setting download location on a torrent before the meta info is resolved Added location/MOC paths to category pane tooltips Several minor Web Interface fixes Refinements to static and scrolling ellipsizing layout routines Several fixes and improvements to single and multi-line text edit controls Many other minor fixes throughout the user interface A major overhaul of the Android framework has also been done: API target raised to 35, page alignment set to 16K Rewrote all inset processing routines Full rewrite of foreground service, application, and main activity objects New permission request routines Added multi-cast lock request before UPNP/LPDP discovery operations Fixed file permission and locking problems when loading .torrent from web browsers Fixed problems with Z-ordering of modal / non-modal and popup windows Fixed handling of back gesture on newer OS Added status bar icon adjustment based on status bar background color Added option in Settings > UI > Behavior to continue running in tray when task removed from recents App can be closed by swiping away notification Rewrote IME interface, fixed several problems with auto-correct, on-screen keyboard visibility, and cursor positioning Added full support for Android hardware mouse and keyboard function Added full tooltip implementation for Android hovering via mouse or other cursor device Full rewrite of popup menu widgets to better support hardware pointers and keyboard Added mouse cursor updating framework for Android hovering Added Settings > Import/Export to Android builds Added language file support to Android builds Download: Tixati 64-bit | Tixati 32-bit ~20.0 MB (Freeware) Download: Portable Tixati 3.43 | 114.0 MB Download: Tixati 3.43 for Linux | Android View: Tixati Website | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • Firefox 152.0.1 by Razvan Serea Firefox is a fast, full-featured Web browser. It offers great security, privacy, and protection against viruses, spyware, malware, and it can also easily block pop-up windows. The key features that have made Firefox so popular are the simple and effective UI, browser speed and strong security capabilities. Firefox has complete features for browsing the Internet. It is very reliable and flexible due to its implemented security features, along with customization options. Firefox includes pop-up blocking, tab-browsing, integrated Google search, simplified privacy controls, a streamlined browser window that shows you more of the page than any other browser and a number of additional features that work with you to help you get the most out of your time online. Firefox key features Enhanced Tracking Protection (ETP) – Blocks trackers, cookies, cryptominers, and fingerprinters by default. Private Browsing Mode – Deletes history, cookies, and temporary files when closed. Lightweight & Fast Performance – Optimized memory usage with efficient page loading. Cross-Platform Sync – Sync bookmarks, passwords, history, and open tabs across devices. Customizable Interface – Toolbars, themes, and extensions can be tailored to user needs. Strong Privacy Controls – Options to manage cookies, permissions, and site data easily. Reader Mode – Strips away clutter for distraction-free reading. Pocket Integration – Save and read articles offline with Pocket built into Firefox. Picture-in-Picture (PiP) – Watch videos in a floating window while multitasking. Extensions & Add-ons – Vast library for productivity, security, and personalization. Built-in PDF Viewer – No need for external software to view PDFs. Firefox Monitor – Alerts users if their email is part of a known data breach. Multi-Account Containers – Isolate browsing sessions (e.g., work, personal, shopping). Performance & Resource Efficiency – Uses fewer system resources than some competitors. Open Source & Community-Driven – Transparent development with global contributions. Firefox 152.0.1 fixes: Fixed frequent crashes affecting users with Intel Raptor Lake processors. (Bug 2039575) Fixed an issue on macOS where choosing a PDF option, such as "Save as PDF", from the system print dialog would send the job to your printer instead of saving a file. (Bug 2047850) Download: Firefox 64-bit | Firefox 32-bit | ARM64 | ~70.0 MB (Freeware) Download: Firefox for MacOS | 146.0 MB View: Firefox Home Page | Release Notes Get alerted to all of our Software updates on Twitter at @NeowinSoftware
  • Recent Achievements

    • One Year In
      hhgygy earned a badge
      One Year In
    • One Month Later
      AMV earned a badge
      One Month Later
    • Week One Done
      AMV earned a badge
      Week One Done
    • Collaborator
      ryansurfer98 went up a rank
      Collaborator
    • One Month Later
      Eurosoft10 earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      519
    2. 2
      +Edouard
      172
    3. 3
      PsYcHoKiLLa
      78
    4. 4
      Steven P.
      73
    5. 5
      Michael Scrip
      71
  • Tell a friend

    Love Neowin? Tell a friend!