Re: [gentoo-user] Grub, gpt partitions and BIOS, not uefi thing.

2024-05-05 Thread Dale
Dale wrote:
> Michael wrote:
>> On Sunday, 28 April 2024 13:57:23 BST Dale wrote:
>>
>>> I just got to figure out how to make it so I can login as root via ssh
>>> again.  I set PermitRootLogin to yes in ssh config but still refuses.  I
>>> did it on my NAS box but can't recall what else I had to do.
>> Just checking the obvious, did you start sshd?
>>
>> Is a port open and listening for ssh connections (use nc, telnet, nmap to 
>> find 
>> out).
>>
>> Will it let you login as a plain user, then 'su' to run as root?
>>
>> Make sure the plain user is in the wheel group.
>
> Right now, I can login as a user then su to root, and password.  I just
> can't login as root directly.  I use Dolphin and the fish thingy to
> access config files etc so I can use Kwrite to edit files etc.  Thing
> is, I have to login as root for some files.  No way to su to root with
> Dolphin, that I know of anyway. 
>
> I'm pretty sure I set this up on the old NAS box.  My searches shows the
> PermitRootLogin set to yes should do it but I guess I missed something. 
>
> Any ideas?  I did search old threads but only found the option above,
> mentioned by Neil I think. 
>
> Dale
>
> :-)  :-) 
>


I figured it out.  I was editing ssh_config when I should be editing
sshd_config.  Note the "d" in there.  After doing some digging, a lot of
digging, I finally noticed that extra "d" in there.  Now it works and I
can use a file manager like Dolphin or something and fish to edit files,
move them around etc. 

Amazing how one letter can really mess things up.  ;-) 

Dale

:-)  :-) 



Re: [gentoo-user] Grub, gpt partitions and BIOS, not uefi thing.

2024-04-28 Thread Dale
Michael wrote:
> On Sunday, 28 April 2024 13:57:23 BST Dale wrote:
>
>> I just got to figure out how to make it so I can login as root via ssh
>> again.  I set PermitRootLogin to yes in ssh config but still refuses.  I
>> did it on my NAS box but can't recall what else I had to do.
> Just checking the obvious, did you start sshd?
>
> Is a port open and listening for ssh connections (use nc, telnet, nmap to 
> find 
> out).
>
> Will it let you login as a plain user, then 'su' to run as root?
>
> Make sure the plain user is in the wheel group.


Right now, I can login as a user then su to root, and password.  I just
can't login as root directly.  I use Dolphin and the fish thingy to
access config files etc so I can use Kwrite to edit files etc.  Thing
is, I have to login as root for some files.  No way to su to root with
Dolphin, that I know of anyway. 

I'm pretty sure I set this up on the old NAS box.  My searches shows the
PermitRootLogin set to yes should do it but I guess I missed something. 

Any ideas?  I did search old threads but only found the option above,
mentioned by Neil I think. 

Dale

:-)  :-) 



Re: [gentoo-user] Grub, gpt partitions and BIOS, not uefi thing.

2024-04-28 Thread Michael
On Sunday, 28 April 2024 13:57:23 BST Dale wrote:

> I just got to figure out how to make it so I can login as root via ssh
> again.  I set PermitRootLogin to yes in ssh config but still refuses.  I
> did it on my NAS box but can't recall what else I had to do.

Just checking the obvious, did you start sshd?

Is a port open and listening for ssh connections (use nc, telnet, nmap to find 
out).

Will it let you login as a plain user, then 'su' to run as root?

Make sure the plain user is in the wheel group.


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] Grub, gpt partitions and BIOS, not uefi thing.

2024-04-28 Thread Dale
Mickaël Bucas wrote:
> Hi
>
> Le sam. 27 avr. 2024 à 18:53, Dale  a écrit :
>> Howdy,
>>
>> I'm installing Gentoo on another old box.
> I was wondering how old this box could be and if it had a BIOS with
> UEFI and GPT.
>
> I didn't find a precise date for BIOS, but Wikipedia[1] shows that the
> first version of Windows for x64 that can read and write GPT was
> published on 2005-04-25. To boot with UEFI, a later version was
> published on 2006-07-22.
> I think this means most BIOSes were compatible to various degrees at this 
> time.
>
> So if your box is less than 20 years old, it should be OK !
> I don't remember how powerful the boxes were at this time, but they
> still had floppy disk drives :)
>
>> Thanks to anyone who has a link, some notes or something.  :-D
>>
>> Dale
>>
>> :-)  :-)
> Good luck
>
> Mickaël Bucas
>
> [1] 
> https://en.wikipedia.org/wiki/GUID_Partition_Table#Windows:_64-bit_versions
>
> .
>


Well, this thing is old enough it is only BIOS.  It's a old Dell
Inspiron 546.  It has a AMD Phenom II X4 955 CPU in it.  I upgraded it a
bit.  It is maxed out at 8GBs of memory.  No floppy but I wouldn't be
surprised to see a connector on the mobo for one tho. 

I mostly use these as rigs to do backups with but could serve as a rig
to watch TV with if my main rig goes to puter heaven.  This one is in a
case at least.  My usual NAS/backup box rig sits on a piece of plywood. 
Good ventilation during compiles tho.  ROFL 

I just got to figure out how to make it so I can login as root via ssh
again.  I set PermitRootLogin to yes in ssh config but still refuses.  I
did it on my NAS box but can't recall what else I had to do.  No
monitor, power plug or anything for it right now.  I moved it to the
kitchen table so I could hook this old Dell to the router. 

Now to see what else I can get into. 

Dale

:-)  :-) 



Re: [gentoo-user] Grub, gpt partitions and BIOS, not uefi thing.

2024-04-28 Thread Michael
On Sunday, 28 April 2024 06:24:09 BST Dale wrote:
> Michael wrote:
> > On Saturday, 27 April 2024 17:53:25 BST Dale wrote:
[snip ...]

> >> I did some research but still find myself in some muddy
> >> waters.  My take on some things I've read, I need a boot partition, not
> >> to be confused with the /boot for kernels, init thingys and such.  Where
> >> I get lost, most use gdisk.  I like cgdisk.  Before that I liked
> >> cfdisk.  Anyway, how do I set up that partition with cgdisk?  Any
> >> minimum size requirements or tiny is enough?
> > 
> > 1MB
> 
> OK.  You know that "alignment" thing that is always on the beginning of
> a drive, could it use it?  I think it is like 2MBs or something. 

It should be 1MB, sector 2048.  For 512 byte sector size you'd get:

2048 x 512 = 1,048,576 bytes

This is coded in on modern partitioning tools to ensure alignment of logical 
and physical sectors by default.  This alignment is critical for the 
performance of so called "Advanced Format" disks with 4096 byte size of 
physical sectors.  Therefore I strongly suggest you let the partitioning tool 
align its logical partitions where it feels best - at the 1MB boundary and not 
change it.

HOWEVER ...

If you are partitioning an old disk on a BIOS MoBo with logical/physical 
sector sizes both at 512/512 bytes, then you can take matters into your own 
hands and force it to start your 'BIOS Boot Partition' at sector 34.  Sectors 
0-33 are used by the MBR and the GPT headers, so leave these alone.

Start sector 34
End sector 2047


> >> Does it have to be a
> >> specific type?
> > 
> > Yes, it has to be set up as a "BIOS Boot Partition", with the "ef02", or
> > GUID 21686148-6449-6E6F-744E-656564454649.
> 
> Light bulb moment.  I've seen 8300 and friends, 8200 etc but never seen
> EF02 before.  Now I see what that type means.  That cleared up some
> muddy water.  That lead me to finding this, it has a nice table of
> common codes. 
> 
> https://wiki.archlinux.org/title/GPT_fdisk

If you select [Type] in cgdisk and then press "L" it will list all the 
partition types available.

I suggest you familiarise yourself with gdisk, which has more options, or as 
already suggested GParted has an easy GUI to navigate through.

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] Grub, gpt partitions and BIOS, not uefi thing.

2024-04-28 Thread Mickaël Bucas
Hi

Le sam. 27 avr. 2024 à 18:53, Dale  a écrit :
> Howdy,
>
> I'm installing Gentoo on another old box.
I was wondering how old this box could be and if it had a BIOS with
UEFI and GPT.

I didn't find a precise date for BIOS, but Wikipedia[1] shows that the
first version of Windows for x64 that can read and write GPT was
published on 2005-04-25. To boot with UEFI, a later version was
published on 2006-07-22.
I think this means most BIOSes were compatible to various degrees at this time.

So if your box is less than 20 years old, it should be OK !
I don't remember how powerful the boxes were at this time, but they
still had floppy disk drives :)

> Thanks to anyone who has a link, some notes or something.  :-D
>
> Dale
>
> :-)  :-)

Good luck

Mickaël Bucas

[1] https://en.wikipedia.org/wiki/GUID_Partition_Table#Windows:_64-bit_versions



Re: [gentoo-user] Grub, gpt partitions and BIOS, not uefi thing.

2024-04-27 Thread Dale
Michael wrote:
> On Saturday, 27 April 2024 17:53:25 BST Dale wrote:
>> Howdy,
>>
>> I'm installing Gentoo on another old box.  To be consistent I like to
>> use cgdisk, GPT I think it is called, to partition all my drives,
>> regardless of size.
> GPT is the partition table structure, which is more advanced than the old DOS 
> partition table structure.
>

I just wasn't 100% sure what it was called. 

>> Thing is, Grub works differently with GPT than it
>> does with the old DOS or whatever it is called, like fdisk does in the
>> old days.
> GRUB works the same, but the disk/partition table structure is different.
>
>
>> I did some research but still find myself in some muddy
>> waters.  My take on some things I've read, I need a boot partition, not
>> to be confused with the /boot for kernels, init thingys and such.  Where
>> I get lost, most use gdisk.  I like cgdisk.  Before that I liked
>> cfdisk.  Anyway, how do I set up that partition with cgdisk?  Any
>> minimum size requirements or tiny is enough?
> 1MB

OK.  You know that "alignment" thing that is always on the beginning of
a drive, could it use it?  I think it is like 2MBs or something. 

>> Does it have to be a
>> specific type?
> Yes, it has to be set up as a "BIOS Boot Partition", with the "ef02", or GUID 
> 21686148-6449-6E6F-744E-656564454649.
>

Light bulb moment.  I've seen 8300 and friends, 8200 etc but never seen
EF02 before.  Now I see what that type means.  That cleared up some
muddy water.  That lead me to finding this, it has a nice table of
common codes. 

https://wiki.archlinux.org/title/GPT_fdisk



>> Does it need to be in a specific place?  
> Not necessarily, but since you're not booting this disk on a UEFI MoBo and 
> consequently won't be using an EFI System Partition (ESP), the very first 
> partition is fine and will be out of the way of the remaining disk.
>
>
>> Formatted with a file system?
> Do not format it.  The raw 1MB partition will be used by GRUB to install its 
> core.img file.
>
>
>> Also, when I do grub-install, do I still point to
>> /dev/sda or to /dev/sda1, if sda1 is the special boot partition?
> Sector 0 of your disk /dev/sda is where GRUB will drop its boot loader image 
> 'boot.img'.  This is the Master Boot Record region.
>
> Normally, with a DOS partition table, GRUB's core.img would be dropped in the 
> empty space of sector 1, following sector 0.  However, in the GPT structure 
> sector 1 is where the GPT partition array data is stored.  You don't want 
> GRUB 
> making a mess by dropping it's core.img on top of it!
>
> So, from what I recall you'd install GRUB like so:
>
> grub-install --boot-directory=/mnt/gentoo/boot --force /dev/sda
>
> If this won't do it, I'll have to boot an old system of mine to check the 
> disk 
> layout in more detail.
>
>

I may look on youtube and see if I can find someone setting up a disk. 
It may have a video, old one for sure.  Maybe that will help me make
sense of it even more.  I think I got figured out how to use cgdisk now
but installing grub may require some more details. 

What I find odd, most of the howtos I found don't show example outputs. 
Then again, it could just work.  O_o

Thanks to all. 

Dale

:-)  :-)



Re: [gentoo-user] Grub, gpt partitions and BIOS, not uefi thing.

2024-04-27 Thread Wols Lists

On 27/04/2024 17:53, Dale wrote:

Howdy,

I'm installing Gentoo on another old box.  To be consistent I like to
use cgdisk, GPT I think it is called, to partition all my drives,
regardless of size.  Thing is, Grub works differently with GPT than it
does with the old DOS or whatever it is called, like fdisk does in the
old days.  I did some research but still find myself in some muddy
waters.  My take on some things I've read, I need a boot partition, not
to be confused with the /boot for kernels, init thingys and such.  Where
I get lost, most use gdisk.  I like cgdisk.  Before that I liked
cfdisk.  Anyway, how do I set up that partition with cgdisk?  Any
minimum size requirements or tiny is enough?  Does it have to be a
specific type?  Does it need to be in a specific place?  Formatted with
a file system?  Also, when I do grub-install, do I still point to
/dev/sda or to /dev/sda1, if sda1 is the special boot partition?

I tried to find a step by step howto with this info but the ones I find
either don't work or leaves me more confused.  Given that the method is
also aging out, it's hard to find good guides.  I'd be real happy just
to have a link to a good howto that I can make sense of.  I can save a
copy local and even print it.  Maybe someone has some notes that will
help.  I just need something to help clear up the muddy waters.


Hmm ...

Michael's version does not ring any bells with me, and indeed my system 
is *not* set up that way. It's UEFI-capable, but at the time I didn't 
have a clue what I was doing, so the mobo dumped me into BIOS, and I 
just installed everything the old way I knew.


I do, however, have a 512MB partition configured as type "Microsoft 
basic data". This is meant to be for the UEFI partition if I get round 
to converting the system.


If you want to "suck it and see", just install grub to /dev/sda. All 
your GPT disks, by default, leave the first 2MB empty, and grub will 
stick itself in there I believe.


Cheers,
Wol



Re: [gentoo-user] Grub, gpt partitions and BIOS, not uefi thing.

2024-04-27 Thread Michael
On Saturday, 27 April 2024 17:53:25 BST Dale wrote:
> Howdy,
> 
> I'm installing Gentoo on another old box.  To be consistent I like to
> use cgdisk, GPT I think it is called, to partition all my drives,
> regardless of size.

GPT is the partition table structure, which is more advanced than the old DOS 
partition table structure.


> Thing is, Grub works differently with GPT than it
> does with the old DOS or whatever it is called, like fdisk does in the
> old days.

GRUB works the same, but the disk/partition table structure is different.


> I did some research but still find myself in some muddy
> waters.  My take on some things I've read, I need a boot partition, not
> to be confused with the /boot for kernels, init thingys and such.  Where
> I get lost, most use gdisk.  I like cgdisk.  Before that I liked
> cfdisk.  Anyway, how do I set up that partition with cgdisk?  Any
> minimum size requirements or tiny is enough?

1MB

> Does it have to be a
> specific type?

Yes, it has to be set up as a "BIOS Boot Partition", with the "ef02", or GUID 
21686148-6449-6E6F-744E-656564454649.


> Does it need to be in a specific place?  

Not necessarily, but since you're not booting this disk on a UEFI MoBo and 
consequently won't be using an EFI System Partition (ESP), the very first 
partition is fine and will be out of the way of the remaining disk.


> Formatted with a file system?

Do not format it.  The raw 1MB partition will be used by GRUB to install its 
core.img file.


> Also, when I do grub-install, do I still point to
> /dev/sda or to /dev/sda1, if sda1 is the special boot partition?

Sector 0 of your disk /dev/sda is where GRUB will drop its boot loader image 
'boot.img'.  This is the Master Boot Record region.

Normally, with a DOS partition table, GRUB's core.img would be dropped in the 
empty space of sector 1, following sector 0.  However, in the GPT structure 
sector 1 is where the GPT partition array data is stored.  You don't want GRUB 
making a mess by dropping it's core.img on top of it!

So, from what I recall you'd install GRUB like so:

grub-install --boot-directory=/mnt/gentoo/boot --force /dev/sda

If this won't do it, I'll have to boot an old system of mine to check the disk 
layout in more detail.


> I tried to find a step by step howto with this info but the ones I find
> either don't work or leaves me more confused.  Given that the method is
> also aging out, it's hard to find good guides.  I'd be real happy just
> to have a link to a good howto that I can make sense of.  I can save a
> copy local and even print it.  Maybe someone has some notes that will
> help.  I just need something to help clear up the muddy waters. 
> 
> Thanks to anyone who has a link, some notes or something.  :-D 
> 
> Dale
> 
> :-)  :-) 



signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] Grub, gpt partitions and BIOS, not uefi thing.

2024-04-27 Thread Mark Knecht
On Sat, Apr 27, 2024 at 9:53 AM Dale  wrote:
>
> Howdy,
>
> I'm installing Gentoo on another old box.  To be consistent I like to
> use cgdisk, GPT I think it is called, to partition all my drives,
> regardless of size.  Thing is, Grub works differently with GPT than it
> does with the old DOS or whatever it is called, like fdisk does in the
> old days.  I did some research but still find myself in some muddy
> waters.  My take on some things I've read, I need a boot partition, not
> to be confused with the /boot for kernels, init thingys and such.  Where
> I get lost, most use gdisk.  I like cgdisk.  Before that I liked
> cfdisk.  Anyway, how do I set up that partition with cgdisk?  Any
> minimum size requirements or tiny is enough?  Does it have to be a
> specific type?  Does it need to be in a specific place?  Formatted with
> a file system?  Also, when I do grub-install, do I still point to
> /dev/sda or to /dev/sda1, if sda1 is the special boot partition?
>
> I tried to find a step by step howto with this info but the ones I find
> either don't work or leaves me more confused.  Given that the method is
> also aging out, it's hard to find good guides.  I'd be real happy just
> to have a link to a good howto that I can make sense of.  I can save a
> copy local and even print it.  Maybe someone has some notes that will
> help.  I just need something to help clear up the muddy waters.
>
> Thanks to anyone who has a link, some notes or something.  :-D
>
> Dale
>
> :-)  :-)

I think I'm not really understanding your request because I only
remember fdisk from the old days, and none of your cfdisk and
cgdisk apps.

If you're working with disk in your new old-box machine then
I'd suggest trying gparted as it pretty much does everything
I've ever needed. It's minimally graphical, can changes the
partition type and boot flags.

This is just one of a billion pages you might look at:

https://linuxiac.com/how-to-use-gparted-to-create-and-resize-partitions/

Wishing you the best of luck,
Mark


Re: [gentoo-user] Grub, gpt partitions and BIOS, not uefi thing.

2024-04-27 Thread Wojciech Kuzyszyn
On Sat, 27 Apr 2024 11:53:25 -0500
Dale  wrote:

> Howdy,
> 
> I'm installing Gentoo on another old box.  To be consistent I like to
> use cgdisk, GPT I think it is called, to partition all my drives,
> regardless of size.  Thing is, Grub works differently with GPT than it
> does with the old DOS or whatever it is called, like fdisk does in the
> old days.  I did some research but still find myself in some muddy
> waters.  My take on some things I've read, I need a boot partition,
> not to be confused with the /boot for kernels, init thingys and such.
>  Where I get lost, most use gdisk.  I like cgdisk.  Before that I
> liked cfdisk.  Anyway, how do I set up that partition with cgdisk?
> Any minimum size requirements or tiny is enough?  Does it have to be a
> specific type?  Does it need to be in a specific place?  Formatted
> with a file system?  Also, when I do grub-install, do I still point to
> /dev/sda or to /dev/sda1, if sda1 is the special boot partition?
> 
> I tried to find a step by step howto with this info but the ones I
> find either don't work or leaves me more confused.  Given that the
> method is also aging out, it's hard to find good guides.  I'd be real
> happy just to have a link to a good howto that I can make sense of.
> I can save a copy local and even print it.  Maybe someone has some
> notes that will help.  I just need something to help clear up the
> muddy waters. 
> 
> Thanks to anyone who has a link, some notes or something.  :-D 
> 
> Dale
> 
> :-)  :-) 
> 

I don't use cgdisk nor gdisk. Here's a link to Arch's wiki about GPT on
BIOS systems:

https://wiki.archlinux.org/title/GRUB#GUID_Partition_Table_(GPT)_specific_instructions

I guess you need to set the same code as in gdisk, or something similar
to BIOS boot or bios_grub as are in other such tools.

Good luck!

Wojciech

-- 
xWK


pgphv3vlrm34X.pgp
Description: Podpis cyfrowy OpenPGP


[gentoo-user] Grub, gpt partitions and BIOS, not uefi thing.

2024-04-27 Thread Dale
Howdy,

I'm installing Gentoo on another old box.  To be consistent I like to
use cgdisk, GPT I think it is called, to partition all my drives,
regardless of size.  Thing is, Grub works differently with GPT than it
does with the old DOS or whatever it is called, like fdisk does in the
old days.  I did some research but still find myself in some muddy
waters.  My take on some things I've read, I need a boot partition, not
to be confused with the /boot for kernels, init thingys and such.  Where
I get lost, most use gdisk.  I like cgdisk.  Before that I liked
cfdisk.  Anyway, how do I set up that partition with cgdisk?  Any
minimum size requirements or tiny is enough?  Does it have to be a
specific type?  Does it need to be in a specific place?  Formatted with
a file system?  Also, when I do grub-install, do I still point to
/dev/sda or to /dev/sda1, if sda1 is the special boot partition?

I tried to find a step by step howto with this info but the ones I find
either don't work or leaves me more confused.  Given that the method is
also aging out, it's hard to find good guides.  I'd be real happy just
to have a link to a good howto that I can make sense of.  I can save a
copy local and even print it.  Maybe someone has some notes that will
help.  I just need something to help clear up the muddy waters. 

Thanks to anyone who has a link, some notes or something.  :-D 

Dale

:-)  :-)