Installing an OS over the existing OS
Aaron Rainbolt
arraybolt3 at ubuntu.com
Thu Feb 16 00:53:41 UTC 2023
On 2/15/23 18:24, Phil wrote:
>
> On 16/2/23 10:09, Aaron Rainbolt wrote:
>> On 2/15/23 17:36, Phil wrote:
>
>> 1. Take the hard drive out of the computer, plug it into another more
>> capable computer, and then use virtualization to install an OS onto
>> the drive.
>> 2. Figure out how to get the system to boot from a USB. If it has USB
>> boot support, that's hopeful, you may just need to make the bootable
>> USB in a particular way in order to get the system to recognize it.
>> 3. Use a live distro (like Puppy Linux) that is designed to be run
>> from an ISO file, add a boot entry for it in GRUB, and then simply
>> boot Puppy from the image file - you can use the rest of the drive to
>> store your files.
>
> Thank you Aaron, option 2 is by far the best option.
>
> I created a bootable USB stick on another laptop using both etcher and
> rufus. The A100 wouldn't boot from either. I also tried using etcher
> on the A100, same result. I tried using unetbootin to create a
> bootable USB stick but sudo ./unetbootin_etc only displays a message
> asking if I want to remove the existing version. No, I just want it
> run again!
>
> Frustration is starting to set in.
>
OK, let's try it. I'm going to assume you're installing Debian 11
32-bit, since it's probably your best bet for a good OS on a 32-bit system.
Firstly, don't use UNetbootin - it does some weird things that are
problematic for some distros. Let's do this the manual way, by copying
files and using grub-install.
The first step is to download the ISO obviously. For a more Xubuntu-like
experience, the 32-bit XFCE Live ISO is probably the best option here.
The ISO can be downloaded with this link:
https://cdimage.debian.org/debian-cd/current-live/i386/iso-hybrid/debian-live-11.6.0-i386-xfce.iso
You may also want the SHA512SUMS file for checking the ISO's integrity -
that way a failed download can be caught.
https://cdimage.debian.org/debian-cd/current-live/i386/iso-hybrid/SHA512SUMS
(Alternatively, if you're OK with experimental software and want a
rolling release that's also made by some of the Xubuntu developers, you
might check out https://xebian.org/ but be warned that Xebian is based
on Debian Sid which is dangerous if you don't know what you're doing.
The main ISOs are a bit broken, the development ISOs seem to work right
for me the times I've used them. They can be gotten from
https://xebian.org/download/pending/)
Once you have your ISO of choice, it's time to make the USB.
Find some USB you're OK with wiping entirely. Don't insert it yet.
Next, open a terminal (usually you can do this with Ctrl+Alt+T). In the
terminal, run `lsblk` (without the backticks - I just use those to make
clear what is and isn't part of a command). This will display what
drives are in your system. Then insert the USB, wait a bit, and then run
`lsblk` again. A new drive should have popped up - this is most likely
your USB. Make sure its size matches the size of the USB reasonably
close (it probably won't be an exact match, it will be a bit smaller -
an 8 GB drive will reasonably show up as about 7.50 GB. But it shouldn't
show up as 4 GB or 64 GB :P) The drive will probably have an ID that
looks like "sdx". I will *assume* that your USB drive is "sdx" for the
rest of this - anywhere you see "sdx", replace it with your USB drive's
ID. (Make sure you do this replacement or you may overwrite the wrong
drive and lose data!)
OK, next step is to partition the drive. Run `sudo fdisk /dev/sdx`. (The
"/dev/" part is necessary, again replace "sdx" with your USB drive's
ID.) Now type `o` and press Enter to make a new partition table. Next,
`n` and Enter to create a new partition. Press Enter four times - this
will finish creating the partition and make it include the whole drive.
Finally, type `w` and press Enter to save your changes.
Next, format the new partition. Run `sudo mkfs.ext4 /dev/sdx1`. The "1"
at the end is necessary - that identifies the partition you want to
format (which in this instance is the first and only partition on the
drive). This will run for a bit. When it's done, you should have a
formatted USB drive.
Next step is to mount the ISO. Make a folder to mount the ISO file to
(`mkdir DebianISO` should do the trick). Then, `sudo mount
/path/to/debian-live-11.6.0-i386-xfce.iso ./DebianISO` to mount the ISO.
(Obviously, change the path to the ISO to wherever your ISO is located.
The filename will also vary depending on what ISO you downloaded.) Once
you have the ISO mounted, run `ls ./DebianISO` to make sure you can see
files from the ISO.
Next, mount the USB drive. You can run `ls /mnt` to make sure that the
/mnt directory is empty - it usually is. If so, run `sudo mount
/dev/sdx1 /mnt` to mount the partition from your USB drive.
Now we can copy the files. Run `sudo cp ./DebianISO/. /mnt/` to copy the
contents of the ISO to the USB. (Make sure every character is there and
there are no typos. Every slash and period in the command is either
necessary or a good idea to have there.)
We now almost have a bootable USB, but there's one more step -
installing a bootloader. Thankfully, the ISO already has a configuration
file for GRUB included, so all we have to do to make the USB bootable is
to install GRUB. And that can be done with one command: `sudo
grub-install --boot-directory /mnt/boot /dev/sdx`. (Don't append a "1"
to the end of this command - you install GRUB to the entire device, not
a partition on the device.)
With all that complete, now we just need to clean up. Run `sudo umount
/mnt && sudo umount ./DebianISO && sync` and that should do all the
needed cleanup work, unmounting the USB, the ISO, and helping to make
sure all changes are written to disk. (The umount commands probably do
that already but I like to run sync just in case since I'm a bit silly
that way :P)
Finally, remove the USB from the computer, shut it down, insert it, and
try to boot from it.
Good luck! Let us know how that goes and if you get hung up.
--
Aaron Rainbolt
Lubuntu Developer
https://github.com/ArrayBolt3
https://launchpad.net/~arraybolt3
@arraybolt3:lubuntu.me on Matrix, arraybolt3 on irc.libera.chat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_0x6169B9B4248C0464.asc
Type: application/pgp-keys
Size: 4853 bytes
Desc: OpenPGP public key
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20230215/8343ac29/attachment-0001.key>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20230215/8343ac29/attachment-0001.sig>
More information about the ubuntu-users
mailing list