[gentoo-user] duplicate gentoo system
I'm looking for an idea to duplicate my old gentoo system. I'm using old programs that require older version php, ( PHP Version 5.6) the program is not compatible with newer php. 7.4 and apache 2.2 Gentoo is install on 1TB SSD (/dev/sda) The new 2TB SSD is M.2 (so it has a strange name) 1.) Is my option only: dd if=/dev/sdX of=/dev/sdY bs=64K conv=noerror,sync If I duplicate the drive this way I'll end-up with two partitions, as I'll have 1TB free on a new drive. Or is there a way to resize partition on M.2 SSD 2.) Another options, I could dig-out the old programs from "attic", but that will not be an easy job. -- Thelma
Re: [gentoo-user] duplicate gentoo system
On Tuesday, 17 November 2020 17:47:09 GMT the...@sys-concept.com wrote: > I'm looking for an idea to duplicate my old gentoo system. > I'm using old programs that require older version php, ( PHP Version > 5.6) the program is not compatible with newer php. 7.4 and apache 2.2 > > Gentoo is install on 1TB SSD (/dev/sda) > The new 2TB SSD is M.2 (so it has a strange name) > > 1.) Is my option only: > dd if=/dev/sdX of=/dev/sdY bs=64K conv=noerror,sync > > If I duplicate the drive this way I'll end-up with two partitions, as > I'll have 1TB free on a new drive. Or is there a way to resize > partition on M.2 SSD > > 2.) Another options, I could dig-out the old programs from "attic", but > that will not be an easy job. You could go about this in a number of different ways. dd command will take forever, as it is copying every bit and byte from one disk to the next, whether it contains data or not. I prefer to use a clonezilla liveUSB to copy a disk or selected partitions between disks, which will take significantly less time as only blocks with data get copied over. You can increase the partition size after you finish copying it onto the new disk and then the filesystem size within it. Gparted can run both steps in a single stroke. If you prefer a more manual and tedious way, you can create a partition as large as you need it to be on the new disk, format it with a filesystem of choice, then use rsync or tar to copy over the files you want and --exclude anything you don't want copied over. signature.asc Description: This is a digitally signed message part.
Re: [gentoo-user] duplicate gentoo system
On 11/17/2020 11:26 AM, Michael wrote: > On Tuesday, 17 November 2020 17:47:09 GMT the...@sys-concept.com wrote: >> I'm looking for an idea to duplicate my old gentoo system. >> I'm using old programs that require older version php, ( PHP Version >> 5.6) the program is not compatible with newer php. 7.4 and apache 2.2 >> >> Gentoo is install on 1TB SSD (/dev/sda) >> The new 2TB SSD is M.2 (so it has a strange name) >> >> 1.) Is my option only: >> dd if=/dev/sdX of=/dev/sdY bs=64K conv=noerror,sync >> >> If I duplicate the drive this way I'll end-up with two partitions, as >> I'll have 1TB free on a new drive. Or is there a way to resize >> partition on M.2 SSD >> >> 2.) Another options, I could dig-out the old programs from "attic", but >> that will not be an easy job. > > You could go about this in a number of different ways. > > dd command will take forever, as it is copying every bit and byte from one > disk to the next, whether it contains data or not. > > I prefer to use a clonezilla liveUSB to copy a disk or selected partitions > between disks, which will take significantly less time as only blocks with > data get copied over. > > You can increase the partition size after you finish copying it onto the new > disk and then the filesystem size within it. Gparted can run both steps in a > single stroke. > > If you prefer a more manual and tedious way, you can create a partition as > large as you need it to be on the new disk, format it with a filesystem of > choice, then use rsync or tar to copy over the files you want and --exclude > anything you don't want copied over. Thanks for the input, will try on the weekend.
Re: [gentoo-user] duplicate gentoo system
On 11/17/2020 11:26 AM, Michael wrote: > On Tuesday, 17 November 2020 17:47:09 GMT the...@sys-concept.com wrote: >> I'm looking for an idea to duplicate my old gentoo system. >> I'm using old programs that require older version php, ( PHP Version >> 5.6) the program is not compatible with newer php. 7.4 and apache 2.2 >> >> Gentoo is install on 1TB SSD (/dev/sda) >> The new 2TB SSD is M.2 (so it has a strange name) >> >> 1.) Is my option only: >> dd if=/dev/sdX of=/dev/sdY bs=64K conv=noerror,sync >> >> If I duplicate the drive this way I'll end-up with two partitions, as >> I'll have 1TB free on a new drive. Or is there a way to resize >> partition on M.2 SSD >> >> 2.) Another options, I could dig-out the old programs from "attic", but >> that will not be an easy job. > > You could go about this in a number of different ways. > > dd command will take forever, as it is copying every bit and byte from one > disk to the next, whether it contains data or not. > > I prefer to use a clonezilla liveUSB to copy a disk or selected partitions > between disks, which will take significantly less time as only blocks with > data get copied over. > > You can increase the partition size after you finish copying it onto the new > disk and then the filesystem size within it. Gparted can run both steps in a > single stroke. > > If you prefer a more manual and tedious way, you can create a partition as > large as you need it to be on the new disk, format it with a filesystem of > choice, then use rsync or tar to copy over the files you want and --exclude > anything you don't want copied over. Manual approach might be confusing and prone to errors. I will try Gparted as you suggested but I was wondering if it will allow me to combine/join partitions. On most modern system I think there is: 1 - boot partiton 2 - swap if needed 3 - root partition (where home is as well) My current layout is old one: dev/sda1/boot ext2 /dev/sda3 / ext4 /dev/sda2 noneswap /dev/sda4 /home ext4 Is it possible with Gparted combine "/" and "home" partitions, or is it as simple as coping all file from "home" partition to "/" home folder.
Re: [gentoo-user] duplicate gentoo system
from the...@sys-concept.com: > Manual approach might be confusing and prone to errors. > I will try Gparted as you suggested but I was wondering if it will allow > me to combine/join partitions. On most modern system I think there is: > 1 - boot partiton > 2 - swap if needed > 3 - root partition (where home is as well) > My current layout is old one: > dev/sda1 /boot ext2 > /dev/sda3 / ext4 > /dev/sda2 noneswap > /dev/sda4 /home ext4 > Is it possible with Gparted combine "/" and "home" partitions, or is it > as simple as coping all file from "home" partition to "/" home folder. I never used parted or gparted, but prefer to put "home" in a different partition. That way, if you mess up or otherwise have to reformat the root partition, home is unaffected. Also, you can access the same home partition from more than one OS installation that can read/write the file system, in this case ext2 or ext4. Tom
Re: [gentoo-user] duplicate gentoo system
the...@sys-concept.com wrote: > or is it > as simple as coping all file from "home" partition to "/" home folder. > That's what I would do. First, umount /home. Mount /home somewhere else like /mnt/tmp or something. Copy everything from /mnt/tmp to /home. Make sure to remove any entries in fstab for /home too. Then umount /mnt/tmp and carry on. I don't think I'm missing anything. I'm with Thomas tho, I've always kept /home on a separate partition. It has made things easier when I have to reinstall, lose a drive etc etc. Things happen and having eggs in separate baskets can help. That said, if it will work best for your needs or circumstances or both, then it is what it is. Hope that helps. Dale :-) :-)
Re: [gentoo-user] duplicate gentoo system
On Wed, 18 Nov 2020 02:49:10 -0600, Dale wrote: > the...@sys-concept.com wrote: > > or is it > > as simple as coping all file from "home" partition to "/" home folder. > > > > > That's what I would do. First, umount /home. Mount /home somewhere > else like /mnt/tmp or something. Copy everything from /mnt/tmp to > /home. Make sure to remove any entries in fstab for /home too. Then > umount /mnt/tmp and carry on. I don't think I'm missing anything. Or you can bind mount / somewhere and copy /home to home on the bind mount, saves unmounting anything. mount --bind / /mnt/tmp rsync -a /home/ /mnt/tmp/home/ > I'm with Thomas tho, I've always kept /home on a separate partition. It > has made things easier when I have to reinstall, lose a drive etc etc. > Things happen and having eggs in separate baskets can help. That said, > if it will work best for your needs or circumstances or both, then it is > what it is. Agreed, it also helps with backing up you are likely to have different requirements for backing up the OS, which is replaceable, and your data, which isn't. -- Neil Bothwick First Law of Laboratory Work: Hot glass looks exactly the same as cold glass. pgpyYm2YhoU1P.pgp Description: OpenPGP digital signature
Re: [gentoo-user] duplicate gentoo system
Neil Bothwick wrote: > On Wed, 18 Nov 2020 02:49:10 -0600, Dale wrote: > >> the...@sys-concept.com wrote: >>> or is it >>> as simple as coping all file from "home" partition to "/" home folder. >>> >> That's what I would do. First, umount /home. Mount /home somewhere >> else like /mnt/tmp or something. Copy everything from /mnt/tmp to >> /home. Make sure to remove any entries in fstab for /home too. Then >> umount /mnt/tmp and carry on. I don't think I'm missing anything. > Or you can bind mount / somewhere and copy /home to home on the bind > mount, saves unmounting anything. > > mount --bind / /mnt/tmp > rsync -a /home/ /mnt/tmp/home/ > True. I'm not to familiar with bind mounting, unless I copy and paste from a wiki or something. Would be easier tho. ;-) >> I'm with Thomas tho, I've always kept /home on a separate partition. It >> has made things easier when I have to reinstall, lose a drive etc etc. >> Things happen and having eggs in separate baskets can help. That said, >> if it will work best for your needs or circumstances or both, then it is >> what it is. > Agreed, it also helps with backing up you are likely to have different > requirements for backing up the OS, which is replaceable, and your data, > which isn't. > > > -- Neil Bothwick First Law of Laboratory Work: Hot glass looks exactly > the same as cold glass. I like your sigs. Sometimes they have me rolling. ROFL Dale :-) :-)
Re: [gentoo-user] duplicate gentoo system
On Wednesday, 18 November 2020 06:46:35 GMT the...@sys-concept.com wrote: > On 11/17/2020 11:26 AM, Michael wrote: > > On Tuesday, 17 November 2020 17:47:09 GMT the...@sys-concept.com wrote: > >> I'm looking for an idea to duplicate my old gentoo system. > >> I'm using old programs that require older version php, ( PHP Version > >> 5.6) the program is not compatible with newer php. 7.4 and apache 2.2 > >> > >> Gentoo is install on 1TB SSD (/dev/sda) > >> The new 2TB SSD is M.2 (so it has a strange name) > >> > >> 1.) Is my option only: > >> dd if=/dev/sdX of=/dev/sdY bs=64K conv=noerror,sync > >> > >> If I duplicate the drive this way I'll end-up with two partitions, as > >> I'll have 1TB free on a new drive. Or is there a way to resize > >> partition on M.2 SSD > >> > >> 2.) Another options, I could dig-out the old programs from "attic", but > >> that will not be an easy job. > > > > You could go about this in a number of different ways. > > > > dd command will take forever, as it is copying every bit and byte from one > > disk to the next, whether it contains data or not. > > > > I prefer to use a clonezilla liveUSB to copy a disk or selected partitions > > between disks, which will take significantly less time as only blocks with > > data get copied over. > > > > You can increase the partition size after you finish copying it onto the > > new disk and then the filesystem size within it. Gparted can run both > > steps in a single stroke. > > > > If you prefer a more manual and tedious way, you can create a partition as > > large as you need it to be on the new disk, format it with a filesystem of > > choice, then use rsync or tar to copy over the files you want and > > --exclude > > anything you don't want copied over. > > Manual approach might be confusing and prone to errors. > I will try Gparted as you suggested but I was wondering if it will allow > me to combine/join partitions. On most modern system I think there is: > 1 - boot partiton > 2 - swap if needed > 3 - root partition (where home is as well) > > My current layout is old one: > dev/sda1 /boot ext2 > /dev/sda3 / ext4 > /dev/sda2 noneswap > /dev/sda4 /home ext4 > > Is it possible with Gparted combine "/" and "home" partitions, or is it > as simple as coping all file from "home" partition to "/" home folder. Others have answered this already and I agree with them, a separate /home partition is better for longer term OS maintenance/back up/replacement, without messing up with your personal data in /home. However, if you really want to have your /home directory on the same partition as / then a step by step approach could be: 1. Use Gparted to create /boot[1], / and swap partitions of the desired size. Use up the whole 2TB of the new disk if you want, or make each partition to any size you like, as long as each partition on the new disk is at least as large as the corresponding partition on the old disk. You can use LVM if you want to have resizable logical volumes on the new disk. 2. Use Clonezilla LiveCD/USB to clone /boot and / partitions from the old to the new disk. If the new partitions are larger in size compared to the old partitions, use Gparted (or CLI tools like resize2fs) after you finish cloning the partition data to resize the filesystem and fill up the new partitions. Create the new swap (mkswap and swapon). 3. Then mount your /home partition on the old disk and the / partition on the new disk and use 'rsync -axAHX' or tar (don't forget --xattrs) to copy over the /home directory from the old to the new. 4. Adjust the new /etc/fstab accordingly.[2] 5. Reboot using the new disk to check all is as it should be. [1] You may not want/need a new /boot partition - the old /boot in /dev/sda1 will be able to also boot the cloned / partition, but you would need to adjust/update your boot manager to include the new / partition. [2] Clonezilla will copy over the original partition UUID so you will need to check this with blkid and change it with tune2fs to avoid clashes if both disks will be on the same PC. I hope I haven't missed up anything in the above, since it's not something I do often, but troubleshooting omissions should be easy to resolve. signature.asc Description: This is a digitally signed message part.
Re: [gentoo-user] duplicate gentoo system
On 18/11/2020 11:22, Michael wrote: However, if you really want to have your /home directory on the same partition as / then a step by step approach could be: One big problem with /home on / is that a rogue luser can DoS your system by filling the disk. Same reason you should keep /var on a different partition - you don't want logs filling the partition because you got your rotate wrong ... Cheers, Wol
Re: [gentoo-user] duplicate gentoo system
On Wednesday, 18 November 2020 19:16:55 GMT antlists wrote: > On 18/11/2020 11:22, Michael wrote: > > However, if you really want to have your /home directory on the same > > partition > > as / then a step by step approach could be: > One big problem with /home on / is that a rogue luser can DoS your > system by filling the disk. Same reason you should keep /var on a > different partition - you don't want logs filling the partition because > you got your rotate wrong ... > > Cheers, > Wol I usually leave the /home and /boot directories on / for VM systems, which I use only for testing. I have no personal data on these systems and only use them to test OS or apps and particular configurations with them. On installations which I use on personal laptops/desktops I always have /var, / home, /boot on separate partitions for good reasons already mentioned. However, each to their own. :-) signature.asc Description: This is a digitally signed message part.
Re: [gentoo-user] duplicate gentoo system
John_ El mar., 17 nov. 2020 a las 18:47, escribió: > I'm looking for an idea to duplicate my old gentoo system. > I'm using old programs that require older version php, ( PHP Version > 5.6) the program is not compatible with newer php. 7.4 and apache 2.2 > > Gentoo is install on 1TB SSD (/dev/sda) > The new 2TB SSD is M.2 (so it has a strange name) > > 1.) Is my option only: > dd if=/dev/sdX of=/dev/sdY bs=64K conv=noerror,sync > > If I duplicate the drive this way I'll end-up with two partitions, as > I'll have 1TB free on a new drive. Or is there a way to resize > partition on M.2 SSD > > 2.) Another options, I could dig-out the old programs from "attic", but > that will not be an easy job. > > -- > Thelma > >
[gentoo-user] duplicate gentoo system - errors
OK, I used Gparted (Bootable usb) to copy partition from: Western Digital driver, usually: /dev/sda1 etc to M.2 SSD /dev/ nvme0n1p1 etc I can boot M.2 drive, but the x-server doesn't work (even though I use same graphical card). Network is not working (easy fix, new driver needs to be compiled IN) but there is a bigger problem. Duplicating was easy, but when I try to recompile a kernel I get an error: make menuconfig HOSTCC script/kconfig/mconf.o : internal compiler error: Illegal instruction Even if I try to run: emerge --info I get: Illegal instruction In addition my fstab doesn't look correct (but it works) /dev/sda1/bootext2 It should be something like: /dev/nvme0n1p1 /boot ext2 -- Thelma
Re: [gentoo-user] duplicate gentoo system - errors
On Sunday, 22 November 2020 23:39:44 GMT the...@sys-concept.com wrote: > OK, I used Gparted (Bootable usb) to copy partition from: > Western Digital driver, usually: > /dev/sda1 etc > > to M.2 SSD > /dev/ nvme0n1p1 etc > > I can boot M.2 drive, but the x-server doesn't work (even though I use > same graphical card). Network is not working (easy fix, new driver > needs to be compiled IN) but there is a bigger problem. If you have cloned each partition from the old to the new disk, then the new disk should work exactly as the old disk does. I mean, it should have the same kernel, the same / filesystem, the same modules, etc. Since the new disk is an nvme drive, you will need additional drivers - should these not be available in the old kernel. > Duplicating was easy, but when I try to recompile a kernel I get an error: > > make menuconfig > HOSTCC script/kconfig/mconf.o > : internal compiler error: Illegal instruction > > Even if I try to run: emerge --info I get: > Illegal instruction > > In addition my fstab doesn't look correct (but it works) > /dev/sda1/bootext2 > > It should be something like: > /dev/nvme0n1p1 /boot ext2 Do you have both disks connected to the MoBo when you're trying to boot from the new disk? Have you changed the UUIDs on the new partitions? Have you installed the boot manager on the new disk (if using MBR)? signature.asc Description: This is a digitally signed message part.
Re: [gentoo-user] duplicate gentoo system - errors
On 11/22/2020 05:25 PM, Michael wrote: > On Sunday, 22 November 2020 23:39:44 GMT the...@sys-concept.com wrote: >> OK, I used Gparted (Bootable usb) to copy partition from: >> Western Digital driver, usually: >> /dev/sda1 etc >> >> to M.2 SSD >> /dev/ nvme0n1p1 etc >> >> I can boot M.2 drive, but the x-server doesn't work (even though I use >> same graphical card). Network is not working (easy fix, new driver >> needs to be compiled IN) but there is a bigger problem. > > If you have cloned each partition from the old to the new disk, then the new > disk should work exactly as the old disk does. I mean, it should have the > same kernel, the same / filesystem, the same modules, etc. > > Since the new disk is an nvme drive, you will need additional drivers - > should > these not be available in the old kernel. > > >> Duplicating was easy, but when I try to recompile a kernel I get an error: >> >> make menuconfig >> HOSTCC script/kconfig/mconf.o >> : internal compiler error: Illegal instruction >> >> Even if I try to run: emerge --info I get: >> Illegal instruction >> >> In addition my fstab doesn't look correct (but it works) >> /dev/sda1/bootext2 >> >> It should be something like: >> /dev/nvme0n1p1 /boot ext2 > > Do you have both disks connected to the MoBo when you're trying to boot from > the new disk? Yes, they are both connected > Have you changed the UUIDs on the new partitions? Never used UUID in fstab. Do I just run: blkid|grep UUID and copy it to fstab. > Have you installed the boot manager on the new disk (if using MBR)? I just copied the whole MBR to a new disk and it worked, the system boots, but nothing can be compiled.
Re: [gentoo-user] duplicate gentoo system - errors
On 2020.11.22 20:09, the...@sys-concept.com wrote: On 11/22/2020 05:25 PM, Michael wrote: > On Sunday, 22 November 2020 23:39:44 GMT the...@sys-concept.com wrote: >> OK, I used Gparted (Bootable usb) to copy partition from: >> Western Digital driver, usually: >> /dev/sda1 etc >> >> to M.2 SSD >> /dev/ nvme0n1p1 etc >> >> I can boot M.2 drive, but the x-server doesn't work (even though I use >> same graphical card). Network is not working (easy fix, new driver >> needs to be compiled IN) but there is a bigger problem. > > If you have cloned each partition from the old to the new disk, then the new > disk should work exactly as the old disk does. I mean, it should have the > same kernel, the same / filesystem, the same modules, etc. > > Since the new disk is an nvme drive, you will need additional drivers - should > these not be available in the old kernel. > > >> Duplicating was easy, but when I try to recompile a kernel I get an error: >> >> make menuconfig >> HOSTCC script/kconfig/mconf.o >> : internal compiler error: Illegal instruction >> >> Even if I try to run: emerge --info I get: >> Illegal instruction >> >> In addition my fstab doesn't look correct (but it works) >> /dev/sda1/bootext2 >> >> It should be something like: >> /dev/nvme0n1p1 /boot ext2 > > Do you have both disks connected to the MoBo when you're trying to boot from > the new disk? Yes, they are both connected > Have you changed the UUIDs on the new partitions? Never used UUID in fstab. Do I just run: blkid|grep UUID and copy it to fstab. > Have you installed the boot manager on the new disk (if using MBR)? I just copied the whole MBR to a new disk and it worked, the system boots, but nothing can be compiled. I would confirm that you are really booted from the new disk and not the old one. It is possible that the MBR from the new disk was used to boot, but if /etc/fstab says /boot is mounted from /dev/sda1 then that does seem wrong. I almost always put an empty file in the root of each partition named for the disk/partition just so I can be sure what's actually mounted. Is /etc/fstab identical on both disks? What does fstab say about where / is mounted from?
Re: [gentoo-user] duplicate gentoo system - errors
On 11/22/2020 06:16 PM, Jack wrote: > On 2020.11.22 20:09, the...@sys-concept.com wrote: >> On 11/22/2020 05:25 PM, Michael wrote: >> > On Sunday, 22 November 2020 23:39:44 GMT the...@sys-concept.com wrote: >> >> OK, I used Gparted (Bootable usb) to copy partition from: >> >> Western Digital driver, usually: >> >> /dev/sda1 etc >> >> >> >> to M.2 SSD >> >> /dev/ nvme0n1p1 etc >> >> >> >> I can boot M.2 drive, but the x-server doesn't work (even though I use >> >> same graphical card). Network is not working (easy fix, new driver >> >> needs to be compiled IN) but there is a bigger problem. >> > >> > If you have cloned each partition from the old to the new disk, then >> the new >> > disk should work exactly as the old disk does. I mean, it should >> have the >> > same kernel, the same / filesystem, the same modules, etc. >> > >> > Since the new disk is an nvme drive, you will need additional >> drivers - should >> > these not be available in the old kernel. >> > >> > >> >> Duplicating was easy, but when I try to recompile a kernel I get an >> error: >> >> >> >> make menuconfig >> >> HOSTCC script/kconfig/mconf.o >> >> : internal compiler error: Illegal instruction >> >> >> >> Even if I try to run: emerge --info I get: >> >> Illegal instruction >> >> >> >> In addition my fstab doesn't look correct (but it works) >> >> /dev/sda1 /boot ext2 >> >> >> >> It should be something like: >> >> /dev/nvme0n1p1 /boot ext2 >> > >> > Do you have both disks connected to the MoBo when you're trying to >> boot from >> > the new disk? >> >> Yes, they are both connected >> >> > Have you changed the UUIDs on the new partitions? >> >> Never used UUID in fstab. Do I just run: blkid|grep UUID >> and copy it to fstab. >> >> > Have you installed the boot manager on the new disk (if using MBR)? >> >> I just copied the whole MBR to a new disk and it worked, the system >> boots, but nothing can be compiled. > I would confirm that you are really booted from the new disk and not the > old one. It is possible that the MBR from the new disk was used to > boot, but if /etc/fstab says /boot is mounted from /dev/sda1 then that > does seem wrong. I almost always put an empty file in the root of each > partition named for the disk/partition just so I can be sure what's > actually mounted. Is /etc/fstab identical on both disks? What does > fstab say about where / is mounted from? You are absolutely correct. I was booting the whole time the Western Digital (old drive). :-/ My mistake, once I removed the WD drive the new M.2 SSD doesn't even boot. I think the easiest way would be to re-install the Getnoo from scratch and dig out the old programs I need from "attic". Mixing/moving SSD (sda) and M2.2 (nvme0n1) and transferring partitions might not be as easy.
Re: [gentoo-user] duplicate gentoo system - errors
On Sun, Nov 22, 2020 at 6:39 PM wrote: > > make menuconfig > HOSTCC script/kconfig/mconf.o > : internal compiler error: Illegal instruction > > Even if I try to run: emerge --info I get: > Illegal instruction > Is this running on the same CPU, or are you migrating to a different system? If the CPU changes then you need to make sure that everything on your system was built with a -march compatible with your new system. When you plan on migrating between systems it is a good idea to set -march very conservatively, such as -march=x86-64. It is safe to set -mtune to whatever you want, but -march produces code that only runs on that particular CPU. Of course if the new CPU supports EVERY instruction that the previous CPU has then you're fine, but you'd be surprised how many oddball instructions aren't on various CPUs. -- Rich
Re: [gentoo-user] duplicate gentoo system - errors
On Sun, 22 Nov 2020 18:27:53 -0700, the...@sys-concept.com wrote: > > I would confirm that you are really booted from the new disk and not > > the old one. It is possible that the MBR from the new disk was used > > to boot, but if /etc/fstab says /boot is mounted from /dev/sda1 then > > that does seem wrong. I almost always put an empty file in the root > > of each partition named for the disk/partition just so I can be sure > > what's actually mounted. Is /etc/fstab identical on both disks? > > What does fstab say about where / is mounted from? > > You are absolutely correct. I was booting the whole time the Western > Digital (old drive). :-/ My mistake, once I removed the WD drive the > new M.2 SSD doesn't even boot. Check the settings in your BIOS/firmware to make sure it detects the drive and is set to boot from it. > I think the easiest way would be to re-install the Getnoo from scratch And if it still doesn't work because of a firmware issue, you still have a non-booting system but with no OS installed either. It's better to try and diagnose the problem rather than throwing everything away in the hope that the problem goes with it. -- Neil Bothwick Contentsoftaglinemaysettleduringshipping. pgplLnz9raYNR.pgp Description: OpenPGP digital signature
Re: [gentoo-user] duplicate gentoo system - errors
On Monday, 23 November 2020 01:09:16 GMT the...@sys-concept.com wrote: > On 11/22/2020 05:25 PM, Michael wrote: > > Do you have both disks connected to the MoBo when you're trying to boot > > from the new disk? > > Yes, they are both connected In this case the /dev/sda* you see could well be on the old disk. > > Have you changed the UUIDs on the new partitions? > > Never used UUID in fstab. Do I just run: blkid|grep UUID > and copy it to fstab. I warned you about UUIDs. The block device of /dev/sda* could be pointing at a partition either on the old, or the new disk. In such cases it is a good idea to find out what block devices the MoBo identifies and what the kernel. Go into your BIOS GUI and check if your MoBo sees both disks. You could select which disk to boot from in the BIOS menu. Before you change this, boot the OS and let's look at what block devices the kernel identifies: ls -la /dev/disk/by-* If in the various symlinks listed you will find what disk(s) and partitions your kernel identifies. Alternative commands are blkid, lsblk, udevadm info, hwinfo --block, et al. As long as the kernel has the appropriate modules and you're not missing any necessary firmware, you should find what the nvme disk is identified as and corresponding PARTUUIDs and filesystem UUIDs. When you clone a disk, partition tables, PARTUUIDs, and fs UUIDs, will be copied over. Therefore the kernel will not be able to differentiate reliably which is which, old or new. In addition, sometimes devices are not initialized in the same order. So when probed by the kernel what was identified as /dev/sda last time could be /dev/ sdb now, further adding to confusion when the fs data content is identical. Gparted has an option to change a UUID to a new random number - I suggest you use it. https://gparted.org/display-doc.php?name=help-manual#gparted-changing-partition-uuid On the CLI you can use instead uuidgen and then tune2fs. Once you've done this, it would make sense to mount the / partition on the new disk and adjust its fstab accordingly. In addition you will need to update GRUB so it picks up the new disk / partition. > > Have you installed the boot manager on the new disk (if using MBR)? > > I just copied the whole MBR to a new disk and it worked, the system > boots, but nothing can be compiled. How did you copy the MBR? Using dd command? Unless you cloned a whole disk the MBR sector content won't have been copied over. If the MBR sector has not been copied over the new disk will not be able to boot on its own, but you could still boot it from the old disk, as long as GRUB on the old disk has been updated to pick up the new disk's / partition. I don't think you mentioned it, but in any case I assume you've been using a legacy BIOS with a conventional MBR boot loader and GRUB as a boot manager. As Neil suggested, finding out what's wrong with your current setup and fixing it should prove more fruitful than unnecessarily wasting time reinstalling the whole OS. Ask if you get stuck. signature.asc Description: This is a digitally signed message part.
Re: [gentoo-user] duplicate gentoo system - errors
On Sun, Nov 22, 2020 at 04:39:44PM -0700, the...@sys-concept.com wrote > > Duplicating was easy, but when I try to recompile a kernel I get an error: > > make menuconfig > HOSTCC script/kconfig/mconf.o > : internal compiler error: Illegal instruction > > Even if I try to run: emerge --info I get: > Illegal instruction Ouch! Are the CPUs exactly identical? If not, then you may get the "Illegal instruction" error. This is a "feature" of Gentoo, which is often user-optimized for a specific CPU. What's the CPU on the source machine and what's the CPU on the target machine? If in doubt, execute... gcc -c -Q -march=native --help=target | grep march= ...on each machine. There are 3 sub-families of "Intel" machines. 1) bog-standard Intel code, e.g. core2, also runs on AMD and Intel Atom CPUs at least as new or newer. 2) Intel Atom code runs only on same or newer Intel Atom, because it has the MOVBE instruction set the others lack. 3) AMD code runs only on same or newer AMD, because it has the 3DNow! instruction set the others lack. If you have such a mismatch, your only option may be to rebuild from scratch. -- Walter Dnes I don't run "desktop environments"; I run useful applications
Re: [gentoo-user] duplicate gentoo system - errors
On Mon, Nov 23, 2020 at 9:10 AM Walter Dnes wrote: > > > Ouch! Are the CPUs exactly identical? If not, then you may get the > "Illegal instruction" error. This is a "feature" of Gentoo, which is > often user-optimized for a specific CPU. This "feature" has nothing to do with Gentoo, but just with the fact that users can set their CFLAGS to whatever you wish. If you set a conservative -march and then set a more aggressive -mtune then your binaries will run anywhere. That is how most distros do it. The default CFLAGS in make.conf are "-O2 -pipe". If you stick to those defaults your binaries will run anywhere. There is nothing wrong with using -march, but you definitely need to keep in mind that if you ever change CPUs then you're going to need to rebuild everything. You could just rebuild @system with generic CFLAGS and then rebuild everything with -march=native or whatever you prefer once your new system is running. Your applications wouldn't run that way, but you could still boot the OS and the toolchain will work. If gcc is broken then you can't rebuild in place. -- Rich
Re: [gentoo-user] duplicate gentoo system - errors
On 23/11/2020 10:37, Michael wrote: Have you changed the UUIDs on the new partitions? Never used UUID in fstab. Do I just run: blkid|grep UUID and copy it to fstab. I warned you about UUIDs. The block device of /dev/sda* could be pointing at a partition either on the old, or the new disk. In such cases it is a good idea to find out what block devices the MoBo identifies and what the kernel. If you're messing about with disks, partitions, etc, you NEED to have a basic understanding of UUIDs. Bear in mind that the UID bit (iirc) stands for *UNIQUE* ID. Linux (as has been said) allocates sda, sdb etc in the order it finds partitions, which can be somewhat random. So there is no guarantee, if you specify root as sda, something could glitch (or you've stuck an eSATA drive on, or or or) and suddenly it's sdb and your system can't find root! So what the initial boot system does is it sets up /dev/.../UUID as symlinks to the appropriate sdx. So when boot says "root = UUID", it looks at the symlink to find out whether it's sda, sdb, sdc or whatever. Now if you use dd to copy the old disk to the new, and leave both disks connected, anything looking by sda or sdb is going to find it but you won't know which disk it's found. At BEST the same applies to anything looking by UUID. But it could be a lot worse - anything that relies on the UUID being unique (which is what is promised) could do real damage to the system if they aren't. Read up on gdisk - I guess parted, fdisk, etc have the same - but it has the option to copy an MBR or GPT and generate new UUIDs for all the partitions. You MUST do that if you're leaving both drives in the system. Cheers, Wol
Re: [gentoo-user] duplicate gentoo system - errors
antlists wrote: > On 23/11/2020 10:37, Michael wrote: Have you changed the UUIDs on the new partitions? > >>> Never used UUID in fstab. Do I just run: blkid|grep UUID >>> and copy it to fstab. > >> I warned you about UUIDs. The block device of /dev/sda* could be >> pointing at >> a partition either on the old, or the new disk. In such cases it is >> a good >> idea to find out what block devices the MoBo identifies and what the >> kernel. > > If you're messing about with disks, partitions, etc, you NEED to have > a basic understanding of UUIDs. Bear in mind that the UID bit (iirc) > stands for *UNIQUE* ID. > > Linux (as has been said) allocates sda, sdb etc in the order it finds > partitions, which can be somewhat random. So there is no guarantee, if > you specify root as sda, something could glitch (or you've stuck an > eSATA drive on, or or or) and suddenly it's sdb and your system can't > find root! > > So what the initial boot system does is it sets up /dev/.../UUID as > symlinks to the appropriate sdx. So when boot says "root = UUID", it > looks at the symlink to find out whether it's sda, sdb, sdc or whatever. > > Now if you use dd to copy the old disk to the new, and leave both > disks connected, anything looking by sda or sdb is going to find it > but you won't know which disk it's found. At BEST the same applies to > anything looking by UUID. But it could be a lot worse - anything that > relies on the UUID being unique (which is what is promised) could do > real damage to the system if they aren't. > > Read up on gdisk - I guess parted, fdisk, etc have the same - but it > has the option to copy an MBR or GPT and generate new UUIDs for all > the partitions. You MUST do that if you're leaving both drives in the > system. > > Cheers, > Wol > > This is true. Even I switched to UUID wherever possible or labels. Even external things I use UUID on when possible. I've been bit by this once before and it was a hair pulling experience that I wouldn't want to repeat or wish on one either. If UUID is something you don't want to spend time learning right now, try using labels at least. Just make sure YOU use unique labels for each one. Hint. home-old, home-new works pretty well at times. At least you know it is home and which is old and which is new. Notes may help too. ;-) Hope that helps. Dale :-) :-)
Re: [gentoo-user] duplicate gentoo system - errors
On Mon, 23 Nov 2020 13:51:26 -0600, Dale wrote: > If UUID is something you don't want to spend time learning right now, > try using labels at least. Just make sure YOU use unique labels for > each one. Hint. home-old, home-new works pretty well at times. At > least you know it is home and which is old and which is new. Notes may > help too. ;-) I agree on labels, they are far more readable. But I'm starting to think that duplicating partitions like this is asking for trouble. I think it would be better to create the partitions and filesystems you want on the new disk, then mount both and copy everything over with rsync. That was you won't get any conflicting UUIDs and you can set filesystem or partition labels as you see fit. -- Neil Bothwick First Law of Laboratory Work: Hot glass looks exactly the same as cold glass. pgpW6NHojv1ty.pgp Description: OpenPGP digital signature
Re: [gentoo-user] duplicate gentoo system - errors
On Mon, Nov 23, 2020 at 1:11 PM Neil Bothwick wrote: > > On Mon, 23 Nov 2020 13:51:26 -0600, Dale wrote: > > > If UUID is something you don't want to spend time learning right now, > > try using labels at least. Just make sure YOU use unique labels for > > each one. Hint. home-old, home-new works pretty well at times. At > > least you know it is home and which is old and which is new. Notes may > > help too. ;-) > > I agree on labels, they are far more readable. But I'm starting to think > that duplicating partitions like this is asking for trouble. I think it > would be better to create the partitions and filesystems you want on the > new disk, then mount both and copy everything over with rsync. That was > you won't get any conflicting UUIDs and you can set filesystem or > partition labels as you see fit. > And correct me if I'm wrong but with rsync if something dies in process you can usually start it back up and complete the job without starting over from scratch. I've avoided this thread until now but my preferred way to accomplish what the OP set out to do was to do a very minimal install by hand, modify any make/system specific options as has been discussed earlier, build a kernel specific to the new machine, and then copy my world file and let portage do the dirty work. Takes a lot of time but the system has always been functional with few problems down the road. After all, if you run Gentoo at all you MUST WANT to build software from scratch. Why deny the fun of a complete machine rebuild? ;-) Cheers, Mark - Mark
Re: [gentoo-user] duplicate gentoo system - errors
On Mon, 2020-11-23 at 13:25 -0700, Mark Knecht wrote: > And correct me if I'm wrong but with rsync if something dies in process > you can usually start it back up and complete the job without starting over > from scratch. If you use the --partial flag, yes. I don't think that is enabled by default.
Re: [gentoo-user] duplicate gentoo system - errors
On 23/11/2020 20:25, Mark Knecht wrote: > I agree on labels, they are far more readable. But I'm starting to think > that duplicating partitions like this is asking for trouble. I think it > would be better to create the partitions and filesystems you want on the > new disk, then mount both and copy everything over with rsync. That was > you won't get any conflicting UUIDs and you can set filesystem or > partition labels as you see fit. > And correct me if I'm wrong but with rsync if something dies in process you can usually start it back up and complete the job without starting over from scratch. If you dd the partition (which I'm planning to do), then there's no problem of uuids - that's at the MBR GPT level. The trouble with rsync is if your partition is heavily hard-linked, like mine, you need to make sure you get your rsync options right or your hard-disk usage explodes, and if you do get them right, your ram usage explodes during the copy ... :-) My problem is I'm going to be dd'ing a near-3TB near-full partition, and my wall-time-usage is going to explode ... Cheers, Wol
Re: [gentoo-user] duplicate gentoo system - errors
Neil Bothwick wrote: > On Mon, 23 Nov 2020 13:51:26 -0600, Dale wrote: > >> If UUID is something you don't want to spend time learning right now, >> try using labels at least. Just make sure YOU use unique labels for >> each one. Hint. home-old, home-new works pretty well at times. At >> least you know it is home and which is old and which is new. Notes may >> help too. ;-) > I agree on labels, they are far more readable. But I'm starting to think > that duplicating partitions like this is asking for trouble. I think it > would be better to create the partitions and filesystems you want on the > new disk, then mount both and copy everything over with rsync. That was > you won't get any conflicting UUIDs and you can set filesystem or > partition labels as you see fit. > > Way back when I kept outgrowing the disk I had the OS installed on, that is what I did. I booted from a CD/DVD. I created the new partitions and such. I then created /mnt/old and /mnt/new. I mounted the partitions under the correct one, creating directories for boot, usr, var etc as needed on the new disk. Once all was mounted, I used cp -av /mnt/old* /mnt/new/ to copy things over. Today, I'd likely use rsync tho. If I had to interrupt the process, add the -u option. That worked then but not sure about now. I'd think UUIDs are always unique. I guess there is a 1 in a billion chance of a duplicate but doubtful it would be ran into by many. If nothing else, labels work as long as unique names are used. Using sda, sdb, sdc etc tho is a problem waiting for something bad to happen. Heck, nowadays one can even change the order drives are seen in the BIOS. I'm not sure about EFI stuff. I can make what is sda look like sdb without ever taking the side off my puter case or unhooking anything. Using labels or UUIDs eliminate that problem. In a way, things are more complicated. Thing is, if one uses UUIDs, and only them, it's really pretty simple. Copy and paste helps tho. One wouldn't want a typo. lol Of course, if one is careful, labels work just as well. Dale :-) :-)
Re: [gentoo-user] duplicate gentoo system - errors
On Mon, 23 Nov 2020 20:57:34 +, antlists wrote: > > And correct me if I'm wrong but with rsync if something dies in > > process you can usually start it back up and complete the job without > > starting over from scratch. > > If you dd the partition (which I'm planning to do), then there's no > problem of uuids - that's at the MBR GPT level. PARTUUIDs are are the GPT level, UUIDs are filesystem metadata. -- Neil Bothwick Stupid user error. Terminate user (Y/n) ? pgpgdbmD2sPGi.pgp Description: OpenPGP digital signature
Re: [gentoo-user] duplicate gentoo system - errors
On Mon, 23 Nov 2020 14:31:26 -0600, Matt Connell (Gmail) wrote: > > And correct me if I'm wrong but with rsync if something dies in > > process you can usually start it back up and complete the job without > > starting over from scratch. > > If you use the --partial flag, yes. I don't think that is enabled by > default. The --partial flag applies to individual files, so it may help if the copy fails partway through copying a very large file, it's more useful when used with networked drives. Rsync will carry on where it left of as far as fully copied files are concerned. -- Neil Bothwick Programming Language: (n.) a shorthand way of describing a series of bugs to a computer or a programmer. pgpBg6Poxe5jN.pgp Description: OpenPGP digital signature
Re: [gentoo-user] duplicate gentoo system - errors
On 23/11/20 10:10 pm, Walter Dnes wrote: > On Sun, Nov 22, 2020 at 04:39:44PM -0700, the...@sys-concept.com wrote >> Duplicating was easy, but when I try to recompile a kernel I get an error: >> >> make menuconfig >> HOSTCC script/kconfig/mconf.o >> : internal compiler error: Illegal instruction >> >> Even if I try to run: emerge --info I get: >> Illegal instruction > Ouch! Are the CPUs exactly identical? If not, then you may get the > "Illegal instruction" error. This is a "feature" of Gentoo, which is > often user-optimized for a specific CPU. What's the CPU on the source > machine and what's the CPU on the target machine? If in doubt, > execute... > > gcc -c -Q -march=native --help=target | grep march= > > ...on each machine. There are 3 sub-families of "Intel" machines. > > 1) bog-standard Intel code, e.g. core2, also runs on AMD and Intel Atom >CPUs at least as new or newer. > > 2) Intel Atom code runs only on same or newer Intel Atom, because it has >the MOVBE instruction set the others lack. > > 3) AMD code runs only on same or newer AMD, because it has the 3DNow! >instruction set the others lack. > > If you have such a mismatch, your only option may be to rebuild from > scratch. > quick package the toolchain packages from the wanted cpu system, untar them in the root of the new system so they overwrite the existing package files, do an emerge -e @system, then follow with another for world. Can also use the install CD packages - I have used some quite different versions when recovering a broken system so it work :). Have done it a few times, its a bit messier than than just gcc/glibc/libtool/binutils for the toolchain but does work. The two emerge -e shouldn't be strictly necessary, but it seems to get a better result than just doing world. BillK
Re: [gentoo-user] duplicate gentoo system - errors
> 3) AMD code runs only on same or newer AMD, because it has the 3DNow! >instruction set the others lack. > FYI 3dnow and 3dnowext went away some time ago. It's not in any of the Bulldozer or Zen CPUs.
Re: [gentoo-user] duplicate gentoo system - errors
On Monday, 23 November 2020 19:02:57 GMT antlists wrote: > If you're messing about with disks, partitions, etc, you NEED to have a > basic understanding of UUIDs. That may be true if you have more than one disk of a given type, but if you have only one SATA drive and one NVMe, for instance, there's no chance of their being misnumbered at boot. My workstation has one NVMe drive and two SATAs. They're always detected in the same order, so I've no need to render my fstab illegible with UUIDs. I could use labels, but why bother? The old system ain't broke, so I've no need to fix it. Can you imagine an fstab with 22 partitions specified with UUIDs? Doesn't bear thinking about. -- Regards, Peter.
Re: [gentoo-user] duplicate gentoo system - errors
On Tuesday, 24 November 2020 09:20:52 GMT Peter Humphrey wrote: > On Monday, 23 November 2020 19:02:57 GMT antlists wrote: > > If you're messing about with disks, partitions, etc, you NEED to have a > > basic understanding of UUIDs. > > That may be true if you have more than one disk of a given type, but if you > have only one SATA drive and one NVMe, for instance, there's no chance of > their being misnumbered at boot. > > My workstation has one NVMe drive and two SATAs. They're always detected in > the same order, so I've no need to render my fstab illegible with UUIDs. I > could use labels, but why bother? The old system ain't broke, so I've no > need to fix it. It depends on the bus and disk technology. I have an ARM driven box with a conventional 1TB spinning SATA drive and a USB stick. You can never tell which one will be detected as /dev/sda and which as /dev/sdb. If you have more than one pluggable devices the same identification problem is likely to arise. LABELs and/or UUIDs solve this problem - reliably. > Can you imagine an fstab with 22 partitions specified with UUIDs? Doesn't > bear thinking about. Copying and pasting the output of blkid helps complete the fstab easily and commented lines allow me to explain to myself block device location and purpose, should I need to revisit it some months/years later. signature.asc Description: This is a digitally signed message part.
Re: [gentoo-user] duplicate gentoo system - errors
On Tuesday, 24 November 2020 10:43:25 GMT Michael wrote: > On Tuesday, 24 November 2020 09:20:52 GMT Peter Humphrey wrote: > > My workstation has one NVMe drive and two SATAs. They're always detected > > in the same order, so I've no need to render my fstab illegible with > > UUIDs. I could use labels, but why bother? The old system ain't broke, so > > I've no need to fix it. > > It depends on the bus and disk technology. I have an ARM driven box with a > conventional 1TB spinning SATA drive and a USB stick. You can never tell > which one will be detected as /dev/sda and which as /dev/sdb. If you have > more than one pluggable devices the same identification problem is likely to > arise. LABELs and/or UUIDs solve this problem - reliably. Yes, I have several USB sticks, but specifically because they're transient I expect those to have sdX assigned chronologically. I don't boot with them inserted, so I still don't need anything more than /dev/sdX in fstab. > > Can you imagine an fstab with 22 partitions specified with UUIDs? Doesn't > > bear thinking about. > > Copying and pasting the output of blkid helps complete the fstab easily and > commented lines allow me to explain to myself block device location and > purpose, should I need to revisit it some months/years later. That's still much more complex than my setup, and less legible. To a degree, this is a hobby machine, so I create, delete and move partitions more often than many people do. I couldn't possibly work with UUIDs; it'd be as bad as trying to read someone else's perl code. :) -- Regards, Peter.
Re: [gentoo-user] duplicate gentoo system - errors
On Tue, 24 Nov 2020 09:20:52 +, Peter Humphrey wrote: > My workstation has one NVMe drive and two SATAs. They're always > detected in the same order, so I've no need to render my fstab > illegible with UUIDs. I could use labels, but why bother? The old > system ain't broke, so I've no need to fix it. But you can fix it in your own time, waiting until it breaks is never convenient. > Can you imagine an fstab with 22 partitions specified with UUIDs? > Doesn't bear thinking about. Can you imagine an fstab with 22 partitions? Doesn't bear thinking about. ;-) -- Neil Bothwick Anything is possible if you don't know what you are talking about. pgpaS31xRtgax.pgp Description: OpenPGP digital signature
Re: [gentoo-user] duplicate gentoo system - errors
On Tue, Nov 24, 2020 at 07:56:07PM +1100, Adam Carter wrote > > 3) AMD code runs only on same or newer AMD, because it has the 3DNow! > >instruction set the others lack. > > > > FYI 3dnow and 3dnowext went away some time ago. It's not in any of the > Bulldozer or Zen CPUs. So you're saying that newer AMDs may not run code optimized for older AMDs ??? -- Walter Dnes I don't run "desktop environments"; I run useful applications
Re: [gentoo-user] duplicate gentoo system - errors
On 11/23/2020 01:29 AM, Neil Bothwick wrote: > On Sun, 22 Nov 2020 18:27:53 -0700, the...@sys-concept.com wrote: > >>> I would confirm that you are really booted from the new disk and not >>> the old one. It is possible that the MBR from the new disk was used >>> to boot, but if /etc/fstab says /boot is mounted from /dev/sda1 then >>> that does seem wrong. I almost always put an empty file in the root >>> of each partition named for the disk/partition just so I can be sure >>> what's actually mounted. Is /etc/fstab identical on both disks? >>> What does fstab say about where / is mounted from? >> >> You are absolutely correct. I was booting the whole time the Western >> Digital (old drive). :-/ My mistake, once I removed the WD drive the >> new M.2 SSD doesn't even boot. > > Check the settings in your BIOS/firmware to make sure it detects the > drive and is set to boot from it. I'm back. Yes, BIOS recognized the system, I have one SATA disk connected to it and it is booting OK. But disconnected it so I don't mess something up. >> I think the easiest way would be to re-install the Getnoo from scratch > > And if it still doesn't work because of a firmware issue, you still have > a non-booting system but with no OS installed either. It's better to try > and diagnose the problem rather than throwing everything away in the hope > that the problem goes with it. I booted from Gontoo bootable USB and running: blkid showing: blkid /dev/loop0: TYPE="squashfs" /dev/nvme0n1p1: UUID="5db43d49-810a-4806-955e-d59c4d35ec23" BLOCK_SIZE="4096" TYPE="ext2" PARTUUID="743a7887-c02e-4855-8cb7-865247682bff" /dev/nvme0n1p2: UUID="0c23b340-b5c6-437d-bde9-c5539e64677a" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="696091c3-ed27-4a4a-b371-8fd59e2b7a4d" /dev/nvme0n1p3: UUID="77e449db-7dca-410d-9e70-50165c6ccbb8" TYPE="swap" PARTUUID="b2871b7b-5bd0-4db3-90a5-50545b129a97" Disk /dev/nvme0n1: 1.84 TiB, 2000398934016 bytes, 3907029168 sectors Disk model: Force MP600 Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Disk identifier: FE896335-0C8D-487E-9391-ED43A85D3292 Device StartEndSectors Size Type /dev/nvme0n1p1 204810506231048576 512M Linux filesystem /dev/nvme0n1p21050624 1971752959 1970702336 939.7G Linux filesystem /dev/nvme0n1p3 3840102400 3907028991 66926592 31.9G Linux swap Shouldn't: /dev/nvme0n1p1 be "Bios Boot" Do I need to change it with "fdisk" When trying to mount /boot mount /dev/nvme0n1p1 /mnt/gentoo/boot livecd ~ # ll /mnt/gentoo/boot/ total 16 drwx-- 2 root root 16384 Nov 22 22:26 lost+found There is nothing there. I'm not sure if there is a point of fixing it at this point. It might take less time to reinstall gentoo.
Re: [gentoo-user] duplicate gentoo system - errors
On Tuesday, 24 November 2020 17:23:41 GMT the...@sys-concept.com wrote: > On 11/23/2020 01:29 AM, Neil Bothwick wrote: > > On Sun, 22 Nov 2020 18:27:53 -0700, the...@sys-concept.com wrote: > >>> I would confirm that you are really booted from the new disk and not > >>> the old one. It is possible that the MBR from the new disk was used > >>> to boot, but if /etc/fstab says /boot is mounted from /dev/sda1 then > >>> that does seem wrong. I almost always put an empty file in the root > >>> of each partition named for the disk/partition just so I can be sure > >>> what's actually mounted. Is /etc/fstab identical on both disks? > >>> What does fstab say about where / is mounted from? > >> > >> You are absolutely correct. I was booting the whole time the Western > >> Digital (old drive). :-/ My mistake, once I removed the WD drive the > >> new M.2 SSD doesn't even boot. > > > > Check the settings in your BIOS/firmware to make sure it detects the > > drive and is set to boot from it. > > I'm back. > > Yes, BIOS recognized the system, I have one SATA disk connected to it and it > is booting OK. But disconnected it so I don't mess something up. You'll need to reconnect the old SATA in a minute - see below. > >> I think the easiest way would be to re-install the Getnoo from scratch > > > > And if it still doesn't work because of a firmware issue, you still have > > a non-booting system but with no OS installed either. It's better to try > > and diagnose the problem rather than throwing everything away in the hope > > that the problem goes with it. > > I booted from Gontoo bootable USB and running: blkid > showing: > blkid > /dev/loop0: TYPE="squashfs" > /dev/nvme0n1p1: UUID="5db43d49-810a-4806-955e-d59c4d35ec23" > BLOCK_SIZE="4096" TYPE="ext2" > PARTUUID="743a7887-c02e-4855-8cb7-865247682bff" /dev/nvme0n1p2: > UUID="0c23b340-b5c6-437d-bde9-c5539e64677a" BLOCK_SIZE="4096" TYPE="ext4" > PARTUUID="696091c3-ed27-4a4a-b371-8fd59e2b7a4d" /dev/nvme0n1p3: > UUID="77e449db-7dca-410d-9e70-50165c6ccbb8" TYPE="swap" > PARTUUID="b2871b7b-5bd0-4db3-90a5-50545b129a97" > > > Disk /dev/nvme0n1: 1.84 TiB, 2000398934016 bytes, 3907029168 sectors > Disk model: Force MP600 > Units: sectors of 1 * 512 = 512 bytes > Sector size (logical/physical): 512 bytes / 512 bytes > I/O size (minimum/optimal): 512 bytes / 512 bytes > Disklabel type: gpt > Disk identifier: FE896335-0C8D-487E-9391-ED43A85D3292 > > Device StartEndSectors Size Type > /dev/nvme0n1p1 204810506231048576 512M Linux filesystem > /dev/nvme0n1p21050624 1971752959 1970702336 939.7G Linux filesystem > /dev/nvme0n1p3 3840102400 3907028991 66926592 31.9G Linux swap > > Shouldn't: /dev/nvme0n1p1 be "Bios Boot" > Do I need to change it with "fdisk" The /dev/nvme0n1p1 partition type should be whatever the /dev/sda1 of the old disk was. If you are using a GPT disk on a Legacy BIOS MoBo, with a Hybrid MBR configuration, then yes, it should be a 'BIOS Boot partition' to contain the GRUB Stage 2 code. However, if /dev/nvme0n1p1 is just a conventional /boot partition with an ext2 fs as you show above, containing your /boot/grub/ directory files, then 'Linux filesystem' is the correct partition type. > When trying to mount /boot > mount /dev/nvme0n1p1 /mnt/gentoo/boot > livecd ~ # ll /mnt/gentoo/boot/ > total 16 > drwx-- 2 root root 16384 Nov 22 22:26 lost+found > > There is nothing there. So the contents of /dev/sda1 were not copied over. Were the contents of /dev/sda2 copied over to dev/nvme0n1p2 ? > I'm not sure if there is a point of fixing it at this point. It might take > less time to reinstall gentoo. It will take much less time to use clonezilla to clone the whole disk as I originally suggested, change the UUIDs of the partitions, update GRUB on the new disk, then update GRUB on the old disk. Alternatively, it will also take less time to use Gparted to create and format the partitions you want, then use rsync/tar/cp to copy over the filesystem contents from the old to the new partitions, then update GRUB. If /dev/nvme0n1p1 is the only partition which needs fixing and since this is a small partition in size, it won't take long to reconnect /dev/sda to the MoBo, boot a LiveUSB and run: dd if=/dev/sda1 of=/dev/nvme0n1p1 If you have not copied over the MBR boot loader in sector 0, or have not installed afresh GRUB on the new disk, then you will also need to copy over the MBR sector: dd if=/dev/sda of=/dev/nvme0n1 bs=446 count=1 Or, if you want to also copy over the MBR partition table as it was on the old disk, change the block size to 512 bytes: dd if=/dev/sda of=/dev/nvme0n1 bs=512 count=1 Any of the above should take significantly less time than reinstalling gentoo, then fishing old ebuilds of your required applications from the attic, fetching corresponding source files, only to discover they won't compile on the new installation because of whatever changes may have taken
Re: [gentoo-user] duplicate gentoo system - errors
On Tue, Nov 24, 2020 at 9:49 AM Walter Dnes wrote: > > On Tue, Nov 24, 2020 at 07:56:07PM +1100, Adam Carter wrote > > > 3) AMD code runs only on same or newer AMD, because it has the 3DNow! > > >instruction set the others lack. > > > > > > > FYI 3dnow and 3dnowext went away some time ago. It's not in any of the > > Bulldozer or Zen CPUs. > > So you're saying that newer AMDs may not run code optimized for older > AMDs ??? It depends on what you mean by "optimized." If you mean using -march, then yes, newer AMD OR Intel CPUs may not run software built for older ones. They get rid of instructions as well as adding them, and some lines have instructions not present in others. If you use -mtune then the code will work on any amd64 processor - AMD or Intel. If you use -march then you generally need to rebuild everything without it (or at least @system) before you go switching CPUs. -- Rich
Re: [gentoo-user] duplicate gentoo system - errors
On Tuesday, 24 November 2020 14:18:58 GMT Neil Bothwick wrote: > On Tue, 24 Nov 2020 09:20:52 +, Peter Humphrey wrote: > > My workstation has one NVMe drive and two SATAs. They're always > > detected in the same order, so I've no need to render my fstab > > illegible with UUIDs. I could use labels, but why bother? The old > > system ain't broke, so I've no need to fix it. > > But you can fix it in your own time, waiting until it breaks is never > convenient. There's nothing to fix, as I said. I'm happy to stick with the /dev/sdX syntax for as long as it remains valid. Occam's Razor applies: "don't complicate beyond need." > > Can you imagine an fstab with 22 partitions specified with UUIDs? > > Doesn't bear thinking about. > > Can you imagine an fstab with 22 partitions? Doesn't bear thinking about. The NVMe drive, the main one, has 18; I could merge some of those and delete a couple that aren't used any more. The packages and distfiles directories don't need separate partitions, for example. I suppose it's a bit like Topsy, who "just growed." -- Regards, Peter.
Re: [gentoo-user] duplicate gentoo system - errors
Peter Humphrey wrote: > > On Tuesday, 24 November 2020 14:18:58 GMT Neil Bothwick wrote: > > > On Tue, 24 Nov 2020 09:20:52 +, Peter Humphrey wrote: > > > > My workstation has one NVMe drive and two SATAs. They're always > > > > detected in the same order, so I've no need to render my fstab > > > > illegible with UUIDs. I could use labels, but why bother? The old > > > > system ain't broke, so I've no need to fix it. > > > > > > But you can fix it in your own time, waiting until it breaks is never > > > convenient. > > > There's nothing to fix, as I said. I'm happy to stick with the > /dev/sdX syntax for as long as it remains valid. Occam's Razor > applies: "don't complicate beyond need." > > > > > Can you imagine an fstab with 22 partitions specified with UUIDs? > > > > Doesn't bear thinking about. > > > > > > Can you imagine an fstab with 22 partitions? Doesn't bear thinking > about. > > > The NVMe drive, the main one, has 18; I could merge some of those and > delete a couple that aren't used any more. The packages and distfiles > directories don't need separate partitions, for example. I suppose > it's a bit like Topsy, who "just growed." > > > -- > > Regards, > > Peter. > > I didn't think I needed to "fix" it either until it hit me and caused confusion. Eventually I figured out it was mounting the wrong thing but it was a head scratcher for a while. I was about to start over when I noticed it was mounting the wrong partitions. I can't recall what changed the order but suddenly sda and sdb switched. Believe me, when I got booted, I started setting it up in a way that can't happen again. I might add, the more partitions you have, the more likely this is to bite you at some point. You already have a complicated system with chainloading bootloaders and such so Occam left the building long ago. Do you really need for a hard drive to be recognized differently and create problems? At the very least, labels would be a much better option. Labels like ubuntu-home, ubuntu-usr, or redhat-root, or redhat-usr. Those explain what they are and makes them unique. If you have more than one version, include part of a version if needed. You may recall my hatred of the init thingys. I still hate them. I use them because I want the best chance of my system booting and without it, that could fail. It may boot 100 times just fine but then one day, it breaks and won't boot anymore without a init thingy. At that point, I get to sit here, most likely with no way to get help, and figure out how to fix it. To me, it's much better to just go ahead and set up using the thing and not having to worry about that day hitting me. It seems bad things always happen at the worst moment too. If I can start using a init thingy, using labels should be a easy thing. A walk in the park as the saying goes. ;-) Just my thoughts and opinions. Dale :-) :-)
Re: [gentoo-user] duplicate gentoo system - errors
On Wed, Nov 25, 2020 at 5:54 AM Peter Humphrey wrote: > > > > Can you imagine an fstab with 22 partitions specified with UUIDs? > > > Can you imagine an fstab with 22 partitions? > > The NVMe drive, the main one, has 18; So, if all the partitions are on one drive and that is the only drive you have, there aren't many issues with using raw kernel device names to identify them. It isn't like a partition is just going to disappear. Once you have multiple disks, then UUIDs or labels become more important, especially with a large number. If you had a dozen disks with dozens of partitions and tried to use kernel device names, then anytime a device failed or was enumerated differently you'd have stuff mounted all over the place. That said, something like lvm is a good solution in almost all cases (or something semi-equivalent like zfs/btrfs/etc which have similar functionality built-in). If I had that many partitions I'd hate to deal with wanting to resize one, and with lvm that is pretty trivial. You don't need to use UUIDs with lvm - they're basically equivalent to labels. Now, one area I would use UUIDs is with mdadm if you're not putting lvm on top. I've seen mdadm arrays get renumbered and that is a mess if you're directly mounting them without labels or UUIDs. -- Rich
Re: [gentoo-user] duplicate gentoo system - errors
On 25/11/20 13:31, Rich Freeman wrote: > Now, one area I would use UUIDs is with mdadm if you're not putting > lvm on top. I've seen mdadm arrays get renumbered and that is a mess > if you're directly mounting them without labels or UUIDs. Or if you do it properly you don't need UUIDs :-) mdadm always USED to number its arrays starting with 0. Now it counts down from 127. Worse, if you use numbers, mdadm just changes them as it sees fit. I created my array as md0, next thing I know it's md127. It is recommended to use names, so I call it by what it is, so I have things like /dev/md/gentoo, /dev/md/home etc. I'm moving to lvm, and will use the same tactic. Cheers, Wol
Re: [gentoo-user] duplicate gentoo system - errors
On Wednesday, 25 November 2020 13:06:49 GMT Dale wrote: > Peter Humphrey wrote: > > On Tuesday, 24 November 2020 14:18:58 GMT Neil Bothwick wrote: > > > On Tue, 24 Nov 2020 09:20:52 +, Peter Humphrey wrote: > > > > My workstation has one NVMe drive and two SATAs. They're always > > > > > > > > detected in the same order, so I've no need to render my fstab > > > > > > > > illegible with UUIDs. I could use labels, but why bother? The old > > > > > > > > system ain't broke, so I've no need to fix it. > > > > > > But you can fix it in your own time, waiting until it breaks is never > > > > > > convenient. > > > > There's nothing to fix, as I said. I'm happy to stick with the > > /dev/sdX syntax for as long as it remains valid. Occam's Razor > > applies: "don't complicate beyond need." > > > > > > Can you imagine an fstab with 22 partitions specified with UUIDs? > > > > > > > > Doesn't bear thinking about. > > > > > > Can you imagine an fstab with 22 partitions? Doesn't bear thinking > > > > about. > > > > > > The NVMe drive, the main one, has 18; I could merge some of those and > > delete a couple that aren't used any more. The packages and distfiles > > directories don't need separate partitions, for example. I suppose > > it's a bit like Topsy, who "just growed." > > > > > > > > Regards, > > > > Peter. > > I didn't think I needed to "fix" it either until it hit me and caused > confusion. Eventually I figured out it was mounting the wrong thing but > it was a head scratcher for a while. I was about to start over when I > noticed it was mounting the wrong partitions. I can't recall what > changed the order but suddenly sda and sdb switched. Believe me, when I > got booted, I started setting it up in a way that can't happen again. > > I might add, the more partitions you have, the more likely this is to > bite you at some point. You already have a complicated system with > chainloading bootloaders and such so Occam left the building long ago. Actually I haven't any of those things. Grub, in particular, will never have a place in my home. I jusr have EFI boot images in the UEFI BIOS. Simple. I do take the point, though. > Do you really need for a hard drive to be recognized differently and > create problems? At the very least, labels would be a much better > option. Labels like ubuntu-home, ubuntu-usr, or redhat-root, or > redhat-usr. Those explain what they are and makes them unique. If you > have more than one version, include part of a version if needed. I'll think about that the very first time I get sda and sdb reversed. Honest. :) > You may recall my hatred of the init thingys. I still hate them. I do. Me too. I still don't use one. > I use them because I want the best chance of my system booting and without > it, that could fail. It may boot 100 times just fine but then one day, it > breaks and won't boot anymore without a init thingy. At that point, I > get to sit here, most likely with no way to get help, and figure out how > to fix it. To me, it's much better to just go ahead and set up using > the thing and not having to worry about that day hitting me. It seems > bad things always happen at the worst moment too. > > If I can start using a init thingy, using labels should be a easy > thing. A walk in the park as the saying goes. ;-) Quite so. As I said, I haven't needed to yet, but I'll think about it in due course. :) You may remember my asking why you need a separate /usr partition. You wouldn't need an init thingy if you merged it into the root partition. I have /var separate for simplicity of backup and recovery, and to contain log-file runaways, but not /usr. -- Regards, Peter.
Re: [gentoo-user] duplicate gentoo system - errors
On Wednesday, 25 November 2020 13:31:27 GMT Rich Freeman wrote: > On Wed, Nov 25, 2020 at 5:54 AM Peter Humphrey wrote: > > > > Can you imagine an fstab with 22 partitions specified with UUIDs? > > > > > > Can you imagine an fstab with 22 partitions? > > > > The NVMe drive, the main one, has 18; > > So, if all the partitions are on one drive and that is the only drive > you have, there aren't many issues with using raw kernel device names > to identify them. It isn't like a partition is just going to > disappear. > > Once you have multiple disks, then UUIDs or labels become more > important, especially with a large number. If you had a dozen disks > with dozens of partitions and tried to use kernel device names, then > anytime a device failed or was enumerated differently you'd have stuff > mounted all over the place. Oh yes, of course, I can see that. I'm only saying that a simple system only needs simple setup. > That said, something like lvm is a good solution in almost all cases > (or something semi-equivalent like zfs/btrfs/etc which have similar > functionality built-in). If I had that many partitions I'd hate to > deal with wanting to resize one, and with lvm that is pretty trivial. > You don't need to use UUIDs with lvm - they're basically equivalent to > labels. My old system had two 1TB SSDs, and I used lvm on them. It was a lot of extra complication, so I didn't take that approach on this box. (I still have to have mdadm and friends installed though; the grains aren't fine enough to split them out. USE in make.conf includes "-dmraid -device-mapper -lvm" but it's ineffective.) > Now, one area I would use UUIDs is with mdadm if you're not putting > lvm on top. I've seen mdadm arrays get renumbered and that is a mess > if you're directly mounting them without labels or UUIDs. -- Regards, Peter.
Re: [gentoo-user] duplicate gentoo system - errors
Peter Humphrey wrote: > > On Wednesday, 25 November 2020 13:06:49 GMT Dale wrote: > > > Peter Humphrey wrote: > > > > On Tuesday, 24 November 2020 14:18:58 GMT Neil Bothwick wrote: > > > > > On Tue, 24 Nov 2020 09:20:52 +, Peter Humphrey wrote: > > > > > > My workstation has one NVMe drive and two SATAs. They're always > > > > > > > > > > > > detected in the same order, so I've no need to render my fstab > > > > > > > > > > > > illegible with UUIDs. I could use labels, but why bother? The old > > > > > > > > > > > > system ain't broke, so I've no need to fix it. > > > > > > > > > > But you can fix it in your own time, waiting until it breaks is > never > > > > > > > > > > convenient. > > > > > > > > There's nothing to fix, as I said. I'm happy to stick with the > > > > /dev/sdX syntax for as long as it remains valid. Occam's Razor > > > > applies: "don't complicate beyond need." > > > > > > > > > > Can you imagine an fstab with 22 partitions specified with UUIDs? > > > > > > > > > > > > Doesn't bear thinking about. > > > > > > > > > > Can you imagine an fstab with 22 partitions? Doesn't bear thinking > > > > > > > > about. > > > > > > > > > > > > The NVMe drive, the main one, has 18; I could merge some of those and > > > > delete a couple that aren't used any more. The packages and distfiles > > > > directories don't need separate partitions, for example. I suppose > > > > it's a bit like Topsy, who "just growed." > > > > > > > > > > > > > > > > Regards, > > > > > > > > Peter. > > > > > > I didn't think I needed to "fix" it either until it hit me and caused > > > confusion. Eventually I figured out it was mounting the wrong thing but > > > it was a head scratcher for a while. I was about to start over when I > > > noticed it was mounting the wrong partitions. I can't recall what > > > changed the order but suddenly sda and sdb switched. Believe me, when I > > > got booted, I started setting it up in a way that can't happen again. > > > > > > I might add, the more partitions you have, the more likely this is to > > > bite you at some point. You already have a complicated system with > > > chainloading bootloaders and such so Occam left the building long ago. > > > Actually I haven't any of those things. Grub, in particular, will > never have a place in my home. I jusr have EFI boot images in the UEFI > BIOS. Simple. I do take the point, though. > > > > Do you really need for a hard drive to be recognized differently and > > > create problems? At the very least, labels would be a much better > > > option. Labels like ubuntu-home, ubuntu-usr, or redhat-root, or > > > redhat-usr. Those explain what they are and makes them unique. If you > > > have more than one version, include part of a version if needed. > > > I'll think about that the very first time I get sda and sdb reversed. > Honest. :) > > > > You may recall my hatred of the init thingys. I still hate them. > > > I do. Me too. I still don't use one. > > > > I use them because I want the best chance of my system booting and > without > > > it, that could fail. It may boot 100 times just fine but then one > day, it > > > breaks and won't boot anymore without a init thingy. At that point, I > > > get to sit here, most likely with no way to get help, and figure out how > > > to fix it. To me, it's much better to just go ahead and set up using > > > the thing and not having to worry about that day hitting me. It seems > > > bad things always happen at the worst moment too. > > > > > > If I can start using a init thingy, using labels should be a easy > > > thing. A walk in the park as the saying goes. ;-) > > > Quite so. As I said, I haven't needed to yet, but I'll think about it > in due course. :) > > > You may remember my asking why you need a separate /usr partition. You > wouldn't need an init thingy if you merged it into the root partition. > I have /var separate for simplicity of backup and recovery, and to > contain log-file runaways, but not /usr. > > > -- > > Regards, > > Peter. > > Since I did this install a few years ago, I've had to grow /usr at least twice. I also had to grow /var when I moved the portage tree and such to /var. I have /boot on a plain ext2 partition, root is also on a plain ext4 partition. Everything else, /home, /usr, /var etc is on LVM. I have a very good reason for having a separate /usr. Generally, the only thing a person would need to expand as software grows is /usr. That is where most things go except for things needed to boot. I've also expanded /home many times. Using LVM for that makes it very easy. If I were to build a new system and do a fresh install today, I'd like to have everything possible on LVM, including the root partition if it's doable. If Grub supports /boot on LVM, I'd do that too. If I hadn't had a separate /usr, I would have had to move things around to grow /usr. I've done that in the past and got very tired of doing it the hard way. With LVM, it's just a few
Re: [gentoo-user] duplicate gentoo system - errors
On Wed, Nov 25, 2020 at 8:55 AM Wols Lists wrote: > > On 25/11/20 13:31, Rich Freeman wrote: > > Now, one area I would use UUIDs is with mdadm if you're not putting > > lvm on top. I've seen mdadm arrays get renumbered and that is a mess > > if you're directly mounting them without labels or UUIDs. > > It is recommended to use names, so I call it by what it is, so I have > things like /dev/md/gentoo, /dev/md/home etc. Is that supported with the original metadata format? I suspect that was a big constraint since at the time my bootloader didn't support anything newer. This was many years ago. I haven't touched mdadm recently in favor of zfs and lizardfs. -- Rich
Re: [gentoo-user] duplicate gentoo system - errors
On Wed, 25 Nov 2020 09:13:07 -0600, Dale wrote: > I have /boot on a plain ext2 partition, root is also on a > plain ext4 partition. Everything else, /home, /usr, /var etc is on > LVM. > If I hadn't had a separate /usr, I would have had to move things around > to grow /usr. I've done that in the past and got very tired of doing it > the hard way. With LVM, it's just a few commands and is done while in > use even. I don't even have to logout, reboot or anything. That's a > very good reason for having /usr separate from /. I'd say it's more a very good reason to put / on LVM too. I used to use a separate /usr but found no real benefit so I now leave it as part of /. -- Neil Bothwick A journey of a thousand miles begins with a cash advance from Mom. pgps3UZKrhZW7.pgp Description: OpenPGP digital signature
Re: [gentoo-user] duplicate gentoo system - errors
On Wednesday, 25 November 2020 15:13:07 GMT Dale wrote: > Just my thoughts. Trying to help. It's not like I don't ever find > myself on the receiving end of that. :-D Indeed. Thanks Dale. -- Regards, Peter.
Re: [gentoo-user] duplicate gentoo system - errors
Neil Bothwick wrote: > On Wed, 25 Nov 2020 09:13:07 -0600, Dale wrote: > >> I have /boot on a plain ext2 partition, root is also on a >> plain ext4 partition. Everything else, /home, /usr, /var etc is on >> LVM. >> If I hadn't had a separate /usr, I would have had to move things around >> to grow /usr. I've done that in the past and got very tired of doing it >> the hard way. With LVM, it's just a few commands and is done while in >> use even. I don't even have to logout, reboot or anything. That's a >> very good reason for having /usr separate from /. > I'd say it's more a very good reason to put / on LVM too. I used to use a > separate /usr but found no real benefit so I now leave it as part of /. > > Well, if / is on LVM and /usr needs room, one can just grow / which would increase /usr to, if it is on / and not separate. At the time, I wasn't comfortable putting / or /boot on LVM. I'm not sure it was doable then. I think it required more of the init thingy than I knew how to deal with. It sounds like it may be a lot easier now. Come to think of it, I think I was on the old grub back then. Speaking of, can I get rid of one of these or are both required? If I can remove one, which one? I'm on the new grub and have been for a while. I think I uninstalled the old grub a long time ago. root@fireball / # du -shc /boot/grub* 34M /boot/grub 6.9M /boot/grub2 41M total root@fireball / # If I can get rid of the plain grub, that would free up some space. The grub2 directory isn't as big but still wouldn't hurt. Dale :-) :-)
Re: [gentoo-user] duplicate gentoo system - errors
On 25/11/2020 15:13, Dale wrote: I can't think of a reason not to use labels, at the very least, in most situations. The only one I can think of, a laptop that has only one hard drive. Sort of hard to install two hard drives on a laptop. A external one can be done but never seen one with two spots for internal hard drives. Do they make those??? I'm writing this on one of those right now ... Windows on the first drive, and SUSE and gentoo on the second, except I can't get SUSE to realise I want the boot files on the first drive, so of course EFI can't find it to boot it. (SUSE would put the boot files in the right place if I did an "expert partition" jobbie, but I don't want to do that seeing as I've never played with EFI before.) Cheers, Wol
Re: [gentoo-user] duplicate gentoo system - errors
On 25/11/2020 15:17, Rich Freeman wrote: On Wed, Nov 25, 2020 at 8:55 AM Wols Lists wrote: On 25/11/20 13:31, Rich Freeman wrote: Now, one area I would use UUIDs is with mdadm if you're not putting lvm on top. I've seen mdadm arrays get renumbered and that is a mess if you're directly mounting them without labels or UUIDs. It is recommended to use names, so I call it by what it is, so I have things like /dev/md/gentoo, /dev/md/home etc. Is that supported with the original metadata format? I suspect that was a big constraint since at the time my bootloader didn't support anything newer. Which format is this? version zero (i.e. just mdadm.conf), or 0.9 which is the kernel auto-assembly version. Either way, they're obsolete and bit-rotting. I guess you do need version 1 (the difference between 1.0, 1.1 and 1.2 is the location of the superblock, not the layout). Cheers, Wol
Re: [gentoo-user] duplicate gentoo system - errors
antlists wrote: > On 25/11/2020 15:13, Dale wrote: >> I can't think of a reason not to use labels, at the very least, in most >> situations. The only one I can think of, a laptop that has only one >> hard drive. Sort of hard to install two hard drives on a laptop. A >> external one can be done but never seen one with two spots for internal >> hard drives. Do they make those??? > > I'm writing this on one of those right now ... > > Windows on the first drive, and SUSE and gentoo on the second, except > I can't get SUSE to realise I want the boot files on the first drive, > so of course EFI can't find it to boot it. > > (SUSE would put the boot files in the right place if I did an "expert > partition" jobbie, but I don't want to do that seeing as I've never > played with EFI before.) > > Cheers, > Wol > > First I've heard of a laptop having space for two hard drives. I need to make a note of that. Now one has reason to use labels on laptops too. o_O Dale :-) :-)
Re: [gentoo-user] duplicate gentoo system - errors
On Wed, 25 Nov 2020 10:16:28 -0600, Dale wrote: > I think I was on the old grub back then. Speaking of, can > I get rid of one of these or are both required? If I can remove one, > which one? I'm on the new grub and have been for a while. I think I > uninstalled the old grub a long time ago. > > > root@fireball / # du -shc /boot/grub* > 34M /boot/grub > 6.9M /boot/grub2 > 41M total > root@fireball / # > > > If I can get rid of the plain grub, that would free up some space. The > grub2 directory isn't as big but still wouldn't hurt. GRUB2 uses /boot/grub here, I suspect /boot/grub2 might be the surplus one, but check the timestamps. -- Neil Bothwick Echo > Speak: "Whale oil beef hooked" pgp9cpCQFIKya.pgp Description: OpenPGP digital signature
Re: [gentoo-user] duplicate gentoo system - errors
On Wed, 25 Nov 2020 11:55:56 -0600, Dale wrote: > First I've heard of a laptop having space for two hard drives. I need > to make a note of that. Now one has reason to use labels on laptops > too. o_O You already have. what if you boot with a flash drive connected and it is recognised first? -- Neil Bothwick I am McCoy of Borg. He's assimilated, Jim! pgpt84yA0tcNJ.pgp Description: OpenPGP digital signature
Re: [gentoo-user] duplicate gentoo system - errors
Neil Bothwick wrote: > On Wed, 25 Nov 2020 10:16:28 -0600, Dale wrote: > >> I think I was on the old grub back then. Speaking of, can >> I get rid of one of these or are both required? If I can remove one, >> which one? I'm on the new grub and have been for a while. I think I >> uninstalled the old grub a long time ago. >> >> >> root@fireball / # du -shc /boot/grub* >> 34M /boot/grub >> 6.9M /boot/grub2 >> 41M total >> root@fireball / # >> >> >> If I can get rid of the plain grub, that would free up some space. The >> grub2 directory isn't as big but still wouldn't hurt. > GRUB2 uses /boot/grub here, I suspect /boot/grub2 might be the surplus > one, but check the timestamps. > > Well, grub2 shows the latest change. Plain grub shows older changes. Most things in plain grub shows a date of April 2019. Things in grub2 are 2013 except for grub.cfg which shows June 2020. That is likely about the time I rebuilt my last kernel, or somewhere close to that anyway. Sort of confusing. Just wondering if leaving that alone may be best. ;-) Dale :-) :-)
Re: [gentoo-user] duplicate gentoo system - errors
Neil Bothwick wrote: > On Wed, 25 Nov 2020 11:55:56 -0600, Dale wrote: > >> First I've heard of a laptop having space for two hard drives. I need >> to make a note of that. Now one has reason to use labels on laptops >> too. o_O > You already have. what if you boot with a flash drive connected and it is > recognised first? > > I wasn't counting a external device. I was just referring to internal hard drives. I don't even put flash drives in the same category as a hard drive either, even tho they can get large. I guess SSDs are so small they can fit two in a laptop nowadays. I guess if a laptop is big enough, one could fit a couple regular drives too. Given displays are so big now, it makes for more room. I've just never seen or heard of one before. I wouldn't mind having one of those in a way. OS on one drive, SSD most likely, and /home on its own drive. Almost desktop-ish. LOL Dale :-) :-) P. S. No reply from our old Alan yet. It hasn't bounced yet either.
Re: [gentoo-user] duplicate gentoo system - errors
On Wed, 25 Nov 2020 13:30:46 -0600, Dale wrote: > >> If I can get rid of the plain grub, that would free up some space. > >> The grub2 directory isn't as big but still wouldn't hurt. > > GRUB2 uses /boot/grub here, I suspect /boot/grub2 might be the surplus > > one, but check the timestamps. > > > > > > > Well, grub2 shows the latest change. Plain grub shows older changes. > Most things in plain grub shows a date of April 2019. Things in grub2 > are 2013 except for grub.cfg which shows June 2020. That is likely > about the time I rebuilt my last kernel, or somewhere close to that > anyway. Sort of confusing. > > Just wondering if leaving that alone may be best. ;-) Rename one of the directories and see if you can still boot :) -- Neil Bothwick I'm moving to theory. Everything works there! pgpE4pNvnnk9T.pgp Description: OpenPGP digital signature
Re: [gentoo-user] duplicate gentoo system - errors
On Wed, 25 Nov 2020 13:37:48 -0600, Dale wrote: > >> First I've heard of a laptop having space for two hard drives. I > >> need to make a note of that. Now one has reason to use labels on > >> laptops too. o_O > > You already have. what if you boot with a flash drive connected and > > it is recognised first? > > I wasn't counting a external device. I was just referring to internal > hard drives. I don't even put flash drives in the same category as a > hard drive either, even tho they can get large. Large in capacity but physically small. It's easy to reboot and not realise you have a flash drive connected, which could possibly mess up your drive naming. -- Neil Bothwick Men who have playful kittens shouldn't sleep in the nude. pgpYwcbPwRF8J.pgp Description: OpenPGP digital signature
Re: [gentoo-user] duplicate gentoo system - errors
On 25/11/2020 22:59, Neil Bothwick wrote: On Wed, 25 Nov 2020 13:37:48 -0600, Dale wrote: First I've heard of a laptop having space for two hard drives. I need to make a note of that. Now one has reason to use labels on laptops too. o_O You already have. what if you boot with a flash drive connected and it is recognised first? I wasn't counting a external device. I was just referring to internal hard drives. I don't even put flash drives in the same category as a hard drive either, even tho they can get large. Large in capacity but physically small. It's easy to reboot and not realise you have a flash drive connected, which could possibly mess up your drive naming. Yup. I've forgotten which system it was - possibly this one - but I've got a system which will refuse to boot if I forget I've got a USB stick in it ... Cheers, Wol
Re: [gentoo-user] duplicate gentoo system - errors
antlists wrote: > On 25/11/2020 22:59, Neil Bothwick wrote: >> On Wed, 25 Nov 2020 13:37:48 -0600, Dale wrote: >> > First I've heard of a laptop having space for two hard drives. I > need to make a note of that. Now one has reason to use labels on > laptops too. o_O You already have. what if you boot with a flash drive connected and it is recognised first? >>> >>> I wasn't counting a external device. I was just referring to internal >>> hard drives. I don't even put flash drives in the same category as a >>> hard drive either, even tho they can get large. >> >> Large in capacity but physically small. It's easy to reboot and not >> realise you have a flash drive connected, which could possibly mess up >> your drive naming. >> > Yup. I've forgotten which system it was - possibly this one - but I've > got a system which will refuse to boot if I forget I've got a USB > stick in it ... > > Cheers, > Wol > > I actually have mine set to look for a DVD first, USB stick second and then for my 1st hard drive. Thing is, I know not to have those things there when I boot. Of course, I don't boot/reboot very often. When I do, it's usually a power failure. I guess because I've never did that, except when I need to boot that way, I never thought a person would have one plugged in that way. Of course, I'm a bit weird. Don't bother arguing with me on that. ROFL Dale :-) :-)