You are not logged in.

#1 2022-10-21 06:43:14

thehexagon
Member
From: New Zealand
Registered: 2020-10-26
Posts: 76
Website

Create installation medium onto partition of disk being installed to

Long while since using Arch. I've done some research, and I can't find much on this topic.
I wanted to install Arch Linux onto my laptop, while removing my current Windows install. I wanted to put the Arch ISO onto the last partition on my SSD, behind my backup partition, and then install from there. After this is done, I would delete the Arch ISO partition, and the backup partition, and expand my new install partition size.
I am doing this because I do not have an USB available, and the new Windows update has ruined my battery life, making it worse than Linux, which was my only reason to use Windows.
Can someone help me with this?

Edit: It might seem confusing what my SSD layout is. It is currently

|     Windows ESP - 100MB     |          Windows - 212GB          |     Backup - 17GB     |   Empty - ~9.8GB   |

The empty partition is reserved for the Arch ISO

Edit 2: proper values of partitions + ESP

Last edited by thehexagon (2022-10-22 22:21:12)


NZ - UTC+12, or UTC+13 (depends on DST) | HP ENVY x360 2-in-1 Laptop 15-EW0009TX

Offline

#2 2022-10-21 07:52:45

d.ALT
Member
Registered: 2019-05-10
Posts: 959

Re: Create installation medium onto partition of disk being installed to

At the moment Windows is the only OS that runs on your computer, right?
Is your a BIOS machine or an UEFI one?


I have no the solution you're requiring, sorry, but have you considered other ways?
- Ventoy (non-destructive Installation)
- PXE


<49,17,III,I>    Fama di loro il mondo esser non lassa;
<50,17,III,I>    misericordia e giustizia li sdegna:
<51,17,III,I>    non ragioniam di lor, ma guarda e passa.

Offline

#3 2022-10-21 07:55:58

thehexagon
Member
From: New Zealand
Registered: 2020-10-26
Posts: 76
Website

Re: Create installation medium onto partition of disk being installed to

Yes, my only OS is Windows right now. I don't need it though. I have done some reading, and apparently if you do what I want and pretend the partition is a flash drive, like Windows thinks it is (lmao), you can't boot to it. I'll try to find the link to it.

I currently can't try your solution, but I'll do it tommorow.

Edit: I found it, but it's from 2012
https://bbs.archlinux.org/viewtopic.php?id=155344

Last edited by thehexagon (2022-10-21 07:58:10)


NZ - UTC+12, or UTC+13 (depends on DST) | HP ENVY x360 2-in-1 Laptop 15-EW0009TX

Offline

#4 2022-10-21 08:13:04

d.ALT
Member
Registered: 2019-05-10
Posts: 959

Re: Create installation medium onto partition of disk being installed to

<EDIT>
Another good reading: https://wiki.batocera.org/dual_boot_ubu … nd_windows
</EDIT>

The main issue here is that you don't have a Linux OS that can directly have access to your computer and its storage.
I just remeber that there is another viable solution: In some cases it may be useful to install a native Arch Linux system while running another operating system: one way to accomplish this is to perform the installation through VirtualBox on a raw disk..

Last edited by d.ALT (2022-10-21 08:29:37)


<49,17,III,I>    Fama di loro il mondo esser non lassa;
<50,17,III,I>    misericordia e giustizia li sdegna:
<51,17,III,I>    non ragioniam di lor, ma guarda e passa.

Offline

#5 2022-10-21 08:19:36

thehexagon
Member
From: New Zealand
Registered: 2020-10-26
Posts: 76
Website

Re: Create installation medium onto partition of disk being installed to

Another thing is that VMs don't work on my laptop for some reason, and I can't get it to work. I'll have to test it though.


NZ - UTC+12, or UTC+13 (depends on DST) | HP ENVY x360 2-in-1 Laptop 15-EW0009TX

Offline

#6 2022-10-21 19:32:42

makeshift_rephrase
Member
Registered: 2022-10-21
Posts: 6

Re: Create installation medium onto partition of disk being installed to

I don't know the exact details but I think something like:
- use WSL for commands etc. (if you can, if perms allow, otherwise use application tools)
- get arch image file that has the OS filesystem data, meaning probably not the default website download, or try to dissect the default download somehow
   * i mean this as in, the iso is an ESP (efi fs partition) + FS, you need the FS data separate from the ESP, so you need to dissect it somehow
   * you could simulate a flash drive, but i am not sure how easier it is to have virtual flash vs using native win / wsl tooling if it allows?
- part, format empty space of on your disk into 2 ext4 partitions
- in wsl mount arch image _filesystem partition_ onto one ext4 partition (this is what i meant by dissect earlier)
- from mounted part, copy all arch image data onto other partition
- set up ESP such that is loads your bootloader / initramfs / kernel images
- this should be the bootable minimal arch in empty space

then

- verify multiple times that everything is booting correctly and probably set boot order such that that part boots first
- make sure win install deletion won't bork boot process
- delete win part, remove efi entries
- format space into ext4
- copy all OS files from / onto the new partition, copying the OS again (OR do normal arch install via setup utilities)
- add a separate efi entry for the "real" OS since you want this fallback one if it already works (via above verification)
- set up your distro

Last edited by makeshift_rephrase (2022-10-21 19:38:19)

Offline

#7 2022-10-22 04:10:08

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,171

Re: Create installation medium onto partition of disk being installed to

thehexagon wrote:

Edit: It might seem confusing what my SSD layout is. It is currently

|          Windows - 200GB          |     Backup - 20GB     |   Empty - ~10GB   |

So how do you boot Windows?  This doesn't show an ESP.

https://wiki.archlinux.org/title/Catego … on_process covers alternative methods of installation e.g. installing over ssh.

How are you planning to back up your data? Hopefully not just to a different partition of the same disk!


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#8 2022-10-22 08:12:52

thehexagon
Member
From: New Zealand
Registered: 2020-10-26
Posts: 76
Website

Re: Create installation medium onto partition of disk being installed to

cfr wrote:
thehexagon wrote:

Edit: It might seem confusing what my SSD layout is. It is currently

|          Windows - 200GB          |     Backup - 20GB     |   Empty - ~10GB   |

So how do you boot Windows?  This doesn't show an ESP.

https://wiki.archlinux.org/title/Catego … on_process covers alternative methods of installation e.g. installing over ssh.

How are you planning to back up your data? Hopefully not just to a different partition of the same disk!


My esp is there, I just forgot to put it there, as I wrote the layout from memory.

Sadly, yes, my backup is on the same partition

Edit: how would I SSH into the machine if I don't have a live environment to boot to. This is what the question is about, not the installation process itself, as I know how to do that.

Last edited by thehexagon (2022-10-22 21:59:30)


NZ - UTC+12, or UTC+13 (depends on DST) | HP ENVY x360 2-in-1 Laptop 15-EW0009TX

Offline

#9 2022-10-28 04:01:13

thehexagon
Member
From: New Zealand
Registered: 2020-10-26
Posts: 76
Website

Re: Create installation medium onto partition of disk being installed to

After doing some reading thanks to everyone who has helped, especially d.ALT, I have decided to firstly install an Manjaro ISO (only for easier web browsing) to my empty partition, from which I will wipe my Windows partition and install Arch to it. I will do this by following this guide, which d.ALT has edited into their reply, substituting what is neccessary.

I will keep you guys updated.

Last edited by thehexagon (2022-10-28 04:12:27)


NZ - UTC+12, or UTC+13 (depends on DST) | HP ENVY x360 2-in-1 Laptop 15-EW0009TX

Offline

#10 2022-10-28 04:26:35

thehexagon
Member
From: New Zealand
Registered: 2020-10-26
Posts: 76
Website

Re: Create installation medium onto partition of disk being installed to

Well, someone just gave me a USB. That kinda ruins all the effort I put in. If anyone comes across this tread, and wants to try the solution, please let me know how it went.


NZ - UTC+12, or UTC+13 (depends on DST) | HP ENVY x360 2-in-1 Laptop 15-EW0009TX

Offline

#11 2024-07-18 14:15:46

PoutineErable
Member
Registered: 2024-07-08
Posts: 6

Re: Create installation medium onto partition of disk being installed to

It's 2 years late. But I'm gonna do something similar so here's how I'd do it.

Give yourself like 1-2 Gb if you want to be safe on a new Arch boot partition. (Purist will day it's too much, but Imo, If you have 500 Gb, losing 2 is usefull as 1. Arch boot is big, and if you want to multiboot in the future, that's a saved headache.

Have a 2 gb Arch Install partition.

And a 10Mb Refind partition (You will always boot from refind).

Use gparted or windows parition manager to format and name these partitions. Note which is whoch down.

Then when you reboot, you can bring up the boot menu with
Shift, Enter, ESC, F2, F8, F10, F12. Depends on your pc. The annoying part is finding which it is and noting it down somewhere.

Change the boot priority so refind is first.

Reboot. In refind you selext the arch install iso.
Keep the arcu install partition. Whenever arch breaks, you'll have to go to it. Mount the drives setup the network and then fix whatever.

Offline

#12 2024-07-18 20:32:30

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,223

Re: Create installation medium onto partition of disk being installed to

Thanks for sharing, since it's unlikely the OP is still looking for a solution after 2 years, I'll close this.

Closing.

Offline

Board footer

Powered by FluxBB