You are not logged in.
I tried rsync and the command found at https://wiki.archlinux.org/index.php/Rs … em_cloning
I only get to a GRUB screen with no prompt.
Now, I'm installing xanmod on a completely fresh install because i gave up actually trying to copy and wipe my fresh harddisk every time stuff messed up, the furthest i got was that GRUB screen. I guess I'm just going to spend tens of hours reconfiguring and installing everything as it were.. even though I'm used to arch, compiling my own stuff, have basically everything configured to my liking, and most likely won't get what I have before I've spent closer to hundreds of hours because I haven't written down every single program and compilation, and setting I've changed and where I saved it.
I have tried a complete 100% exact copy of partitions and copied the files using the rsync command ( obviously changing the exclude to exclude/include files that didn't make sense to copy, but also just a complete one) to each partition matching the original, I've tried not using UEFI as it's not needed natively. I've done all the variations. I don't get further.
I obviously tried recreating fstab ensuring everything is fine and dandy. I tried recreating mkinitcpio. I tried using normal Linux on my normal install. I tried reinstalling GRUB ( now my old system have to be configured for awesome booting again, thanks GRUB page for having a bare minimum of info). I just want my programs and configurations...
My actual question and task is how to copy the '/' partition i have to a new hard disk and use everything I already have installed and configured as-is, including boot ? It's apparently not just copying it with the file system cloning thing, even though everything is files.
Offline
I tried reinstalling GRUB
How? What was the *exact* procedure?
You should probably also give more details in respect of /etc/fstab and the initramfs images. Ref https://bbs.archlinux.org/viewtopic.php?id=57855
thanks GRUB page for having a bare minimum of info
Don't be silly, the GRUB page is utterly awesome.
Jin, Jîyan, Azadî
Offline
These are the basic steps:
- rsync
- check if new /boot is also populated (maybe reinstall kernel + initramfs-linux.img + grub)
- adjust fstab
- write bootloader (grub: grub-install + grub-mkconfig)
Bios or UEFI ?
Same filesystem type old <>new ?
Different uuid old<>new filesystem ?
Offline
Kandelborg wrote:I tried reinstalling GRUB
How? What was the *exact* procedure?
You should probably also give more details in respect of /etc/fstab and the initramfs images. Ref https://bbs.archlinux.org/viewtopic.php?id=57855
Which details? I have the command (as all others do) `genfstab` and tried generating a fstab with the newly mounted partitions from an arch-chroot, booting from an installation media. I tried running `mkinitcpio -P`, but still never made it further than this weird `GRUB _` - with no actual input - screen, besides being able to CTRL+ALT+DELETE to restart the computer. I don't know what you are asking for, be more specific in your questioning.
Kandelborg wrote:thanks GRUB page for having a bare minimum of info
Don't be silly, the GRUB page is utterly awesome.
Don't be super silly, I'm just malding at the fact I had no idea my boot files would be overwritten, which they, anyways, apparently didn't after I fixed my fstab file on my external hard disk. I dislike the organization and wording for most of this page, and that's not silly.
The GRUB page is messy and is - in my opinion - lacking in actual useful information; being somewhat more useful from my side...
Now, you shouldn't act like that toward people already being frustrated, yea? Being a rhetorical question, in case you didn't catch on to that either (referring to my obvious frustration, you take as a diss on a decent wiki page)... moving on.
My current setup and the reason I'm even trying all of this (besides making - apparently, because the `rsync` command succeeds very quick - quick and nice backups) is that my '/' partition is 32GB, which isn't enough for all my different packages, headers, and what have you for trying out different programming things, including all the gaming stuff I'm also trying out. I want to set up the system for music as well, which I'm counting on adding even more files.
So with that out of the way; here are my steps for readying my SSD, and re-installing GRUB, not formatted because wth is BBCode and why are URLs not allowed in lists or what the problem was (have you heard of MarkDown):
1. Go to the GRUB page on the utterly awesome arch wiki.
2. Decide for GBT, because my system is capable of using this scheme, reading the note several times to ensure I understood it right, and I can proceed.
2.1 Be confused at the very first line "Create a mebibyte partition (+1M with fdisk or gdisk) on the disk with no file system and with partition type GUID 21686148-6449-6E6F-744E-656564454649." not really providing direct information as to using anything but two specific programs, and after a Google search on the last part "partition type GUID 21686148-6449-6E6F-744E-656564454649" finding it simply means a BIOS boot partition https://en.wikipedia.org/wiki/BIOS_boot_partition
2.2 After personally clarifying what is meant, read the listicle on the name of the actual partition type flag using 3 specific programs, and what they're called in those 3 programs... but actually think they're steps to continue, given the punctuation in the sentence "Create a mebibyte partition (+1M with fdisk or gdisk) on the disk with no file system and with partition type GUID 21686148-6449-6E6F-744E-656564454649.".
2.3 Read the whole section as it's supposed to be read (you thought 2,2 was enough, nope you gotta read this one as well for 2.1 to make proper sense, see how annoying it is when you don't have the knowledge of the structure, and it's not following semantics properly?...) and decide for GParted, as it's parted, but with a GUI, and help avoid dumb mistakes, and saves some time learning the commands and reading the interface. This is the only kind of program I enjoy having a GUI for because it's so easy to mess up any hard disk when you're not comfortable with the task at hand (me not being used to formatting, and having forgotten most of what I've learned since the last time I did this, and actually messed a USB up trying just parted for cool points).
3. Format hard disk (I'm referring to an SSD each and every time I say hard disk from now on, it's just how I like to say it) using GParted, making a giant partition for my system, no partition scheme or anything (this is after trying to copy things directly with all the partitions intact, so we're just taking it from the simplest way I've tried). The boot part is left on the hard disk, is 'cleared' for the formatting option, at 2MiB, and is having the GUID 21686148-6449-6E6F-744E-656564454649 flag, or should I just call it the BIOS boot flag?
4. Make directory `/tmp/ssd` to mount the sda2 partition (being the newly ext4 formatted partition on my hard disk)
4.1 Mount said partition on said folder. `sudo mount /dev/sda2 /tmp/ssd`
4.2 Use the rsync command, including everything besides the recursive folders and all that, looking like this:
`sudo rsync -qaAXHv --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} / /tmp/ssd` (`/dev/sda` being my internal harddisk ready for some awesome files)
5. Run the command `sudo grub-install --target=i386-pc /dev/sda`, which finished without problems
EDIT: 5.1 Run the mkconfig command as well. I'm not missing these newbie things, it's just hard remembering while writing as explicitly as possible for me. I'm literally not continuing before re-reading each step 5 times.
6. Try to boot the hard disk, with no luck.
7. Run installation media, mount the partition in question on `/mnt`, run `genfstab -U /mnt >> /mnt/etc/fstab`
I tried the above steps without copying the boot folder, without installing grub (step nr. 5), and some more variation I frankly forgot by now. I'll try using these steps again, given I'm pretty sure I just have a weird error somewhere I should attend to, or that I somehow was unlucky and got a faulty copy. But if it doesn't work, I'm becoming really hopeless on this - should be an - easy task. Anyways, I posted this in newbie because I had no idea where I messed up and was probably going to be told to use a program intended for the job compared to 'just' rsync.
On a side note: it seems people like you (Head_on_a_Stick) are what's keeping people from learning basics of arch, and never come back to it, just so you're aware. You provided no useful information, and the exact steps you want most likely have nothing to do with anything remotely close to my problem. You assume someone on mobile (I'm assuming you guess this given my computer is doing stuff in a chroot env) has access to logs, and, just to be clear, deter me from ever using this forum again. At least put in a smiley and some encouraging words or something, your post is so useless to me, it solely makes it seem like you're going for a higher number on your post count, and has me wondering how many actual newbies have felt bad about their trying, just to never do it again.
Please reconsider what you're writing and actually think about what you're writing before pressing submit because your post is just as uninformative as my lack of 'logs'; I OBVIOUSLY checked these things before posting on the forum, at least ask what I mean before assuming as you've done in this case. I provide some wording that - at the very, very least - indicate I've spent hundreds of hours CONFIGURING my system, and aren't actually a newbie in the sense of being new to arch. You should act more positively to any kind of poster on a newbie forum. I even provided my task and question after my little rant.
Having to compile most of my stuff anyways, I'll most likely just go to Gentoo... Especially after this interaction.
Last edited by Kandelborg (2021-03-24 02:34:33)
Offline
Wow, that went pear shaped in a hurry.
Kandelborg, your initial post was almost, though not completely information free. Head_On_a_Stick have demonstrated their ability to (a) provide excellent technical advice, and (b) defend themselves here. I assume their post was an attempt to extract more information -- as I think appropriate. Having been (and will possibly again) been a Gentoo person, I know that the response there would also have been to elicit more information,
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
your genfstab command is wrong, this is what the arch wiki tells you:
genfstab -U /mnt >> /mnt/etc/fstabthis is what you had:
genfstab -U /mnt >> /etc/mntand also
Check the resulting /mnt/etc/fstab file, and edit it in case of errorsin fact every time ive done a clone ive updated the fstab manually anyway
were you chrooted when you ran grub-mkconfig and mkinitcpio? otherwise it wont work
Offline
Wow, that went pear shaped in a hurry.
Kandelborg, your initial post was almost, though not completely information free. Head_On_a_Stick have demonstrated their ability to (a) provide excellent technical advice, and (b) defend themselves here. I assume their post was an attempt to extract more information -- as I think appropriate. Having been (and will possibly again) been a Gentoo person, I know that the response there would also have been to elicit more information,
Yes, I actually very much agree; but, well, they're not really providing anything useful in return. That you have to assume an attempt to extract more information kind of proves this point. I was on mobile when I created my initial post, and I realize it wasn't the most constructive post I could have made. I was just getting very, very frustrated with my experience with GRUB, which I couldn't find more information about because it simply provided the text GRUB with no shell or anything else of use.
I think most people would agree that an actual newbie wouldn't have thought that comment to provide them much help, neither think it helpful toward a resolution. I really dislike the 'utterly awesome' comment, and the rest was directed at steps that didn't really relate to my initial issue, nor the title, nor the task or question I provided in the end. I was unsure if what I was doing even made sense, so I provided the task/question that had me finally posting on the forums.
Assuming anything, not regarding a full communication, only taking a small part and commenting on that, again, assuming, that I didn't read a pinned post, doesn't really help much in the long run. I still stand by my last points being made, and I wasn't the one to provide the beginning of this pear-shaped conversation in the first place; the person in question could literally have disregarded everything written beside the last part of the OP, and provide their steps to achieve this, or some directions to solve the issue. Also, maybe link to http://www.catb.org/~esr/faqs/smart-questions.html instead of the post that just seems like a slap in the face to a somewhat useful paragraph:
"I have tried a complete 100% exact copy of partitions and copied the files using the rsync command ( obviously changing the exclude to exclude/include files that didn't make sense to copy, but also just a complete one) to each partition matching the original, I've tried not using UEFI as it's not needed natively. I've done all the variations. I don't get further."
Again, I was on mobile while my computer was doing things, and that's after having spent a few days trying, re-trying, and reading as much as I've been able to find surrounding this issue, which isn't very much. This website is not mobile-friendly, only further fueling my growing frustration, and didn't have me wanting to spend somewhere around 3-4 hours providing the necessary information on a mobile keyboard (it's really not easy to write things on mobile on the forum using a Samsung Galaxy Note S9+ (model given for development purposes, feel free to update the website) with a somewhat cracked touch screen).
I'm having an extremely hard time figuring where my problem could reside, and have come to the conclusion the problem most likely comes from a bad copy since all the other steps would be fine given the information provided in the relevant wiki pages.
Last edited by Kandelborg (2021-03-24 02:40:54)
Offline
your genfstab command is wrong, this is what the arch wiki tells you:
genfstab -U /mnt >> /mnt/etc/fstabthis is what you had:
genfstab -U /mnt >> /etc/mntand also
Check the resulting /mnt/etc/fstab file, and edit it in case of errorsin fact every time ive done a clone ive updated the fstab manually anyway
were you chrooted when you ran grub-mkconfig and mkinitcpio? otherwise it wont work
Oh, that's a grammar error on the post. That's my bad, and that surely wouldn't work. EDIT: I also checked the file and actually re-created it, and checked it several times to ensure no weird behavior on most of my tries.
Yes, I was chrooted doing those commands.
Last edited by Kandelborg (2021-03-24 02:35:47)
Offline
Oh my lord. I just kept running the same basic commands in arch-chroot since no one told me not to... And wouldn't you know it? On the gazillionth time, and after recompiling xanmod and reinstalling linux at least 5 times; it woooooorks! :celebrate_emoji:
Here are is the process, and commands I've been doing again, and again, and again:
1. Boot into installation media; a normal USB with the normal installation media
2. Mount partition (/dev/sda2 in this case) to /mnt
3. Run yay and pacman -Syu
4. Run `genfstab -U /mnt >> /mnt/etc/fstab` from the installation media root (`exit` > run `genfstab -U /mnt >> /mnt/etc/fstab` > `arch-chroot` > continue), after checking the file from inside the chroot, and outside, then deleting /mnt/etc/fstab, only to get the exact same file (this seemed redundant since I'd written down the UUID, and it was all good anyways)
5. Succesfully - i.e. no errors, the command finishes without problems - run `yay linux linux-firmware`
6. Still inside arch-chroot run `mkinitcpio -P` with varying degrees of success, sometimes as a user with Sudo, sometimes as root, usually until it actually runs. But the output was often different, either not finding the images or just going through the process as expected. I know this is run after kernel installation, but you know, better safe than sorry.
7. Run `grub-install --target=i386-pc /dev/sda` finishing without errors or warnings followed by a successful `grub-mkconfig -o /boot/grub/grub.cfg`
7.1 A few times try from installation media root to do the config command on mounted partition `grub-mkconfig -o /etc/boot/grub/grub.cfg`
8. Run `mkinitcpio -P` again because why not (doing this made no difference whatsoever unless you're going to tell me otherwise)
9. Some times try and reinstall Linux and/or xanmod
9.1 If doing step 9, also do steps 6-8 again
10. Exit to installation media root, run command `reboot`
Here's some funky behavior I ran into:
- SystemD failed to mount the right fstab file, basically insisting it remembers the old settings, and either 1) claim it couldn't mount the boot partition on my external hard disk as it's used to 2) after removal of external hard disk, not allowing any kind of startup after GRUB trying to load the kernel
- That's it, I somehow fixed this weird behavior by being insane (repeating the same thing expecting different results) and just repeating the same actions again, and again, and somehow I got to another conclusion sometimes having me keep trying the steps.
I'm betting on systemd=bad in this case.
I somehow got past that GRUB screen after doing a re-format of the hard disk 5 times, and doing the exact same partition scheme (2MiB unformatted with a type GUID 21686148-6449-6E6F-744E-656564454649 (I mean BIOS boot flag)). To perform the exact same rsync command as I've provided in this thread several times to ensure I was doing wrong or something bad happened.
Conclusion:
I'll spend the next few days reading on Gentoo docs and never, ever, until the end of time, touch SystemD again.
If I'm ever trying Arch, for whatever reason, I'll run void, and use openrc or runit or another init, which doesn't try to control my entire system, and provides errors and weird behavior where ever it is, without as much a single sensible documentation page, or way to uninstall.
Count me in as one to hate SystemD for what it has become: an undocumented (okay maybe documented, but by someone who hates anyone trying to read it and without the will to improve it the slightest) monster of unimaginable size, that provides little usage besides init for 98% of its users!
Godspeed to anyone experiencing this.
Last edited by Kandelborg (2021-03-24 11:18:15)
Offline
On a positive note: My system is way faster now, be it upgrading everything after several months of no updates due to a lack of space, or using an internal SSD; the system is way, way faster and much more responsive now ![]()
Last edited by Kandelborg (2021-03-24 11:29:03)
Offline
You need to setup your fstab properly and all kernels, then run mkinitcpio -P once (... or rather, per wrong/adjusted fstab file you'd need to run mkinitcpio so that their relevant files are synchronized). Nothing of this has any inherent relevance to systemd (it's not part of the initramfs by default and it sounds like you didn't get past the initramfs due to wrong fstab/grub configs). This entire progression sounds to me like you've made mistakes in your config that instead of fixing at the appropriate spot went on to throw everything out again to redo everything. You do you, but I'm willing to bet you could've done that in a fraction of the time by fixing your fstab and GRUB configs instead of redoing everything from scratch.
Last edited by V1del (2021-03-24 15:08:57)
Offline
ewaller wrote:Wow, that went pear shaped in a hurry.
Kandelborg, your initial post was almost, though not completely information free. Head_On_a_Stick have demonstrated their ability to (a) provide excellent technical advice, and (b) defend themselves here. I assume their post was an attempt to extract more information -- as I think appropriate. Having been (and will possibly again) been a Gentoo person, I know that the response there would also have been to elicit more information,
Yes, I actually very much agree; but, well, they're not really providing anything useful in return. That you have to assume an attempt to extract more information kind of proves this point. I was on mobile when I created my initial post, and I realize it wasn't the most constructive post I could have made. I was just getting very, very frustrated with my experience with GRUB, which I couldn't find more information about because it simply provided the text GRUB with no shell or anything else of use.
I think most people would agree that an actual newbie wouldn't have thought that comment to provide them much help, neither think it helpful toward a resolution. I really dislike the 'utterly awesome' comment, and the rest was directed at steps that didn't really relate to my initial issue, nor the title, nor the task or question I provided in the end. I was unsure if what I was doing even made sense, so I provided the task/question that had me finally posting on the forums.
Assuming anything, not regarding a full communication, only taking a small part and commenting on that, again, assuming, that I didn't read a pinned post, doesn't really help much in the long run. I still stand by my last points being made, and I wasn't the one to provide the beginning of this pear-shaped conversation in the first place; the person in question could literally have disregarded everything written beside the last part of the OP, and provide their steps to achieve this, or some directions to solve the issue. Also, maybe link to http://www.catb.org/~esr/faqs/smart-questions.html instead of the post that just seems like a slap in the face to a somewhat useful paragraph:
"I have tried a complete 100% exact copy of partitions and copied the files using the rsync command ( obviously changing the exclude to exclude/include files that didn't make sense to copy, but also just a complete one) to each partition matching the original, I've tried not using UEFI as it's not needed natively. I've done all the variations. I don't get further."Again, I was on mobile while my computer was doing things, and that's after having spent a few days trying, re-trying, and reading as much as I've been able to find surrounding this issue, which isn't very much. This website is not mobile-friendly, only further fueling my growing frustration, and didn't have me wanting to spend somewhere around 3-4 hours providing the necessary information on a mobile keyboard (it's really not easy to write things on mobile on the forum using a Samsung Galaxy Note S9+ (model given for development purposes, feel free to update the website) with a somewhat cracked touch screen).
I'm having an extremely hard time figuring where my problem could reside, and have come to the conclusion the problem most likely comes from a bad copy since all the other steps would be fine given the information provided in the relevant wiki pages.
Fair enough.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
You need to setup your fstab properly and all kernels, then run mkinitcpio -P once (... or rather, per wrong/adjusted fstab file you'd need to run mkinitcpio so that their relevant files are synchronized). Nothing of this has any inherent relevance to systemd (it's not part of the initramfs by default and it sounds like you didn't get past the initramfs due to wrong fstab/grub configs). This entire progression sounds to me like you've made mistakes in your config that instead of fixing at the appropriate spot went on to throw everything out again to redo everything. You do you, but I'm willing to bet you could've done that in a fraction of the time by fixing your fstab and GRUB configs instead of redoing everything from scratch and blaming the surrounding tools for it.
I didn't get help for GRUB, I found no information regarding the GRUB _ screen and spent no more than 5 hours researching the topic. I booted into GRUB (I fixed that quite easily with the super informative posts you people have...) after simply rm -rf my /boot folder in arch-chroot and running the grub commands to get a working grub, that booted into systemd hell. This was my second try.
The rest of the tries I'm talking about, and am referring to in my second to last post (which you clearly didn't understand or read) is me not understanding what the hell the faulty systemd things were... I troubleshot this quite easily quickly, without having to ask, this all happened after my first posts here shortly after I answered the super helpful guy asking about how I installed GRUB.
I admittedly ensured... by reading the decent GRUB wiki page, and afterward, simply: STFW/RTFM for a proper GRUB installation, given what I needed wasn't on the GRUB arch wiki page, rather the GRUB docs themselves, and a few issues out and about... So I gotta give that question in isolation some props, it was actually catching on to something. But I didn't get any of the help I needed here nor from the wiki page, only, and let me reiterate, only the basic commands from a badly structured (why am I clicking a link to go to another section for the very next step) page that is what it is for whatever reason I'm just going to accept... It's not like you people are being constructive or want to look past the simplest amount of frustration, and can't handle the slightest amount of correction yourself, I have no business trying to talk about that other than bash it by now... just for the sake of it.
So sure, whatever the problems with systemd.mount and the emergency boot (or whatever it's called) showing the old fstab file (doing a cat /etc/fstab) were, that's on me not having a proper fstab; even though mounting the same fucking hard disk in arch-chroot right after (and right before, even checking the UUID to make super sure... fstab isn't advanced, idk what you take me for at this point, but I know what a faulty fstab looks like), only to cat /mnt/etc/fstab from the installation media, showed the correct (i.e. new fstab, with one entry being the / partition on the internal hard drive)... yea that surely was on me not fixing my fstab, and not systemd being a mess of whatever it does to mount using fstab, which it doesn't, btw, because I STFW, and after not being able to read the mess of systemd docs, googling 'fstab not read by systemd', I stumbled upon a GitHub issue on systemd (#3568) explaining it wants to control shit instead of just reading the fucking file.
My fstab was never the issue, never has been :those_astronauts_meme: - a faulty GRUB for starters, which was easily fixed, not by any help here, and then systemd for the fucking rest
Now that I think about it, the successful boot happened after I reinstalled systemd, having read this issue and deciding not to touch systemd for being too invasive, super kek. Fuck off, man, what are you even doing assuming shit I've explained in detail? It sounds like you lack empathy and reading ability. Fuck this forum I have no business being here, you people are elitist non-empathetic shitposters just for the sake of it. I have no reason to even have a recourse, seriously get a heart and stop acting like dicks... Now I know why this whole community is being looked at by 'normies' the way it is, and that kind of saddens me. You're no more grown-up than I'm being here, I was seriously just frustrated in the beginning, especially being on mobile (fix your shit: integrate MD, and get someone who knows basic CSS3 to make it mobile friendly) and STILL provided my question/task which only one guy were being informative about...
You just hide behind elitism and are accepting systemd as your lord and savior. I've done my due diligence trying to explain myself as best I could, and this is what I get? From an edit (there are both an admin and moderator here, let's be explicit lol): moderator? Yea just fuck the fucking fuck off, I'm outta here. My compilation is done 3 minutes ago anyway.
SystemD sucks, and I don't use arch anymore, by the way.
Last edited by Kandelborg (2021-03-24 15:49:51)
Offline
Systemd isn't my lord and savior, but as you didn't disclose what actual errors you ran into it's really hard to give an informed suggestion on were you got stuck. The only thing I can tell you is that arbitrarily rerunning mkinitcpio and grub-install is unlikely to help.
I apologize for that second sentence, on rereading it came out more confrontational than intended, I still believe you could've saved yourself a lot of frustration by either asking for information earlier, but as you ultimately managed to set it up anyway there was no need for that quip.
Have fun on your future systemd-less endeavours.
Offline
5. Run the command `sudo grub-install --target=i386-pc /dev/sda`, which finished without problems
EDIT: 5.1 Run the mkconfig command as well. I'm not missing these newbie things, it's just hard remembering while writing as explicitly as possible for me. I'm literally not continuing before re-reading each step 5 times.
Note that those steps have to be done from a chroot environment in the copied system. The grub-install command can be run from outside the chroot if the --boot-directory option is passed.
Now, you shouldn't act like that toward people already being frustrated, yea?
https://www.hooktube.com/watch?v=oYOZ3IzRaf4
I'm outta here
Yay! \o/
Disclaimer: I didn't read most of the wall of text.
Jin, Jîyan, Azadî
Offline