Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #224288
| From | Matthew Campbell <trenix25@pm.me> |
|---|---|
| Newsgroups | linux.debian.user |
| Subject | Fw: Grub cannot see my new hard drive |
| Date | 2020-07-02 10:20 +0200 |
| Message-ID | <Ao2BP-45m-7@gated-at.bofh.it> (permalink) |
| References | <AiyEp-5tS-3@gated-at.bofh.it> <AnXC9-If-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
The 4 TB hard drive uses a GPT type partition table, not an MBR type table, which is why the computer can't see it. It can't make sense of GPT tables. It is a Toshiba Satellite laptop. Satellite P105-S6187, model number PSPAAU-01L00S. I just ordered new memory for it yesterday. At the moment one memory card is sitting on top of it with the cover removed. I'll be putting it back together in a moment. It was factory preloaded with Windows Vistsa. name=Matthew%20Campbell&email=trenix25%40pm.me -------- Original Message -------- On Jul 1, 2020, 7:50 PM, David Wright wrote: > On Wed 17 Jun 2020 at 05:14:22 (+0000), Matthew Campbell wrote: >> >> I booted from a USB 2.0 flash drive into Grub2. Then I asked Grub for a command prompt. Then I issued the following three commands: >> >> grub> linux (hd2,msdos1)/vmlinuz root=/dev/sdb1 ro >> grub> initrd (hd2,msdos1)/initrd.img >> grub> boot >> >> /dev/sda is the internal hard drive in the laptop computer. >> /dev/sdb is the new 4 TB Toshiba External USB 3.0 hard drive. >> >> /dev/sdc and /dev/sdd are currently USB 2.0 flash drives with an ext4 file system on the first and only partition. Both use a DOS MBR partition table that sets the first partition as active/bootable. >> >> The hard drive, /dev/sdb, always responds faster than the USB flash drives so it is always /dev/sdb. >> >> Now Debian Linux is running on my new hard drive using /dev/sdb1 as the root partition. I need to set up a separate USB flash drive to do all of this by default so I don't have to do all of this work every time the computer boots up. I also need to install Grub2 on the backup USB flash drive so I can use it to boot my system if something goes wrong and the first USB flash drive that I just used gets screwed up as well. > > Perhaps it would be simpler to use a more generic approach. > You could try installing the package grub-rescue-pc, which > contains within /usr/lib/grub-rescue/: > > -rw-r--r-- 1 root root 5021696 Jun 25 2019 grub-rescue-cdrom.iso > -rw-r--r-- 1 root root 1255424 Jun 25 2019 grub-rescue-floppy.img > lrwxrwxrwx 1 root root 21 Jun 25 2019 grub-rescue-usb.img -> grub-rescue-cdrom.iso > > (The exact sizes may differ according to amd64/i386 architecture.) > I copy the ISO file onto any old USB stick that's past its prime. > > If that stick boots successfully, you should type: > > c for a grub prompt. > ls to list the drives and partitions that grub can see. > ESC to exit from the prompt. > e to edit grub.cfg. > Change set root=(hd0,msdos1) > to the appropriate (drive,partition) from the ls output, eg (hd1,gpt4). > Change root=/dev/sda1 > to the appropriate partition, eg sda4. > F10 to boot. > Grub uses the links in your root filesystem to find the appropriate > vmlinuz and initrd.img. (You might need hd2 and sdb1 for the first > partition on the second disk.) > > Your system should now be running from the hard drive specified. > > As you want to streamline this, it makes sense to change those two > lines on the stick, as appropriate. I tried this out by making a > local copy of the original grub-rescue-cdrom.iso and editing it with > emacs. I searched for the string "For boot" to get to the right place, > and edited as above. gpt4 is shorter than msdos1, so I added a couple > of spaces after the ). This makes it easier to compare the original > and the copy by typing > $ vbindiff your-copy.iso /usr/lib/grub-rescue/grub-rescue-cdrom.iso > and pressing Enter. The differences will show up in red. > > (If you don't have vbindiff, just install the package vbindiff.) > > Copy the modified ISO onto the stick, boot it, and press e as above. > If the menu looks correct, press F10 to boot. Next time you boot > from the stick, just pressing Return will be enough. > > When the USB stick gets ropy, just copy your ISO to another one. > > I didn't bother to investigate why emacs added a harmless linefeed > to the end of the edited ISO. > > I'm surprised that you appear to have an MBR partition table on > the 4TB drive (hd2,msdos1). Is that right or have I misunderstood > something? > > Cheers, > David.
Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: Grub cannot see my new hard drive Matthew Campbell <trenix25@pm.me> - 2020-06-17 07:20 +0200
Re: Grub cannot see my new hard drive deloptes <deloptes@gmail.com> - 2020-06-17 08:50 +0200
Re: Fw: Grub cannot see my new hard drive deloptes <deloptes@gmail.com> - 2020-06-18 07:00 +0200
Re: Grub cannot see my new hard drive David Wright <deblis@lionunicorn.co.uk> - 2020-07-02 05:00 +0200
Fw: Grub cannot see my new hard drive Matthew Campbell <trenix25@pm.me> - 2020-07-02 10:20 +0200
Re: Fw: Grub cannot see my new hard drive "Thomas Schmitt" <scdbackup@gmx.net> - 2020-07-02 11:20 +0200
Re: Fw: Grub cannot see my new hard drive David Christensen <dpchrist@holgerdanske.com> - 2020-07-02 21:00 +0200
Fw: Fw: Grub cannot see my new hard drive Matthew Campbell <trenix25@pm.me> - 2020-07-02 23:20 +0200
Re: Fw: Grub cannot see my new hard drive David Wright <deblis@lionunicorn.co.uk> - 2020-07-02 22:10 +0200
Fw: Fw: Grub cannot see my new hard drive Matthew Campbell <trenix25@pm.me> - 2020-07-02 23:20 +0200
Re: Fw: Fw: Grub cannot see my new hard drive David Wright <deblis@lionunicorn.co.uk> - 2020-07-03 16:40 +0200
Fw: Fw: Fw: Grub cannot see my new hard drive Matthew Campbell <trenix25@pm.me> - 2020-07-03 19:30 +0200
Re: Fw: Fw: Fw: Grub cannot see my new hard drive deloptes <deloptes@gmail.com> - 2020-07-03 21:10 +0200
Re: Grub cannot see my new hard drive David Wright <deblis@lionunicorn.co.uk> - 2020-07-04 04:00 +0200
Re: Grub cannot see my new hard drive deloptes <deloptes@gmail.com> - 2020-07-04 08:00 +0200
Re: Grub cannot see my new hard drive "Thomas Schmitt" <scdbackup@gmx.net> - 2020-07-04 09:00 +0200
Re: Grub cannot see my new hard drive deloptes <deloptes@gmail.com> - 2020-07-04 09:10 +0200
csiph-web