You are not logged in.

#26 2012-05-23 06:54:09

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: [SOLVED] Partition 1 does not start on physical sector boundary.

I hate to repeat myself. Back up your shit if you don't want to reinstall from scratch and use a "live" Linux distribution like GParted Live, Parted Magic. I recommend Parted Magic. Then delete and re-create the partitions. You've been dragging this for 3 weeks. Come on...


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#27 2012-05-23 16:55:06

miky76
Member
From: Italy
Registered: 2011-10-27
Posts: 135

Re: [SOLVED] Partition 1 does not start on physical sector boundary.

Hi,
i've made Gparted to work, and I've made the followin partitions

[root@artemide ~]# gdisk /dev/sdb
GPT fdisk (gdisk) version 0.8.4

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.

Command (? for help): p
Disk /dev/sdb: 5860533168 sectors, 2.7 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): 2FC16FDA-BB3F-4ABB-9FD7-4B1BB78CC39D
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 5860533134
Partitions will be aligned on 2048-sector boundaries
Total free space is 5743592301 sectors (2.7 TiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048          206847   100.0 MiB   8300  Linux filesystem
   2          206848         4302847   2.0 GiB     8200  Linux swap
   3         4302848        55502847   24.4 GiB    8300  Linux filesystem
   4        55502848       116942847   29.3 GiB    8300  Linux filesystem

Command (? for help):

I'm not sure what this means in the section above

Partitions will be aligned on 2048-sector boundaries

can I just copy back alla the datas I've copied before with rsync in the sdb3?

after that I believe I have to install the bootloader for the gpt, correct?

Offline

#28 2012-05-23 21:40:55

nomorewindows
Member
Registered: 2010-04-03
Posts: 3,362

Re: [SOLVED] Partition 1 does not start on physical sector boundary.

miky76 wrote:

Hi,
i've made Gparted to work, and I've made the followin partitions

[root@artemide ~]# gdisk /dev/sdb
GPT fdisk (gdisk) version 0.8.4

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.

Command (? for help): p
Disk /dev/sdb: 5860533168 sectors, 2.7 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): 2FC16FDA-BB3F-4ABB-9FD7-4B1BB78CC39D
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 5860533134
Partitions will be aligned on 2048-sector boundaries
Total free space is 5743592301 sectors (2.7 TiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048          206847   100.0 MiB   8300  Linux filesystem
   2          206848         4302847   2.0 GiB     8200  Linux swap
   3         4302848        55502847   24.4 GiB    8300  Linux filesystem
   4        55502848       116942847   29.3 GiB    8300  Linux filesystem

Command (? for help):

I'm not sure what this means in the section above

Partitions will be aligned on 2048-sector boundaries

can I just copy back alla the datas I've copied before with rsync in the sdb3?

after that I believe I have to install the bootloader for the gpt, correct?

Experiencing a little brain damage here:  https://wiki.archlinux.org/index.php/GU … tion_Table
After reading up on the GPT you're not limited to four, so keep going!  You should have a /, /boot, /usr & /home, so add one more.  You haven't even used nearly all your space, which you weren't intending on initially.  Looks like you are using the right tool this time.  The 2048-sector boundaries is a factor of the sizes of partitions you are using, and better accomodates the huge disk you are using; nothing odd here.


I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.

Offline

#29 2012-05-24 08:25:53

miky76
Member
From: Italy
Registered: 2011-10-27
Posts: 135

Re: [SOLVED] Partition 1 does not start on physical sector boundary.

Thanks a lot big_smile

I've created 2 more partitions for fill all the available space in the disk.

I've copied back all the files I've rsynced from the partition #3 below that i want to use as /

now I will follow the instructions from here
https://wiki.archlinux.org/index.php/Fu … Boot_setup

let's see what is going on big_smile

DSpider, you are right, I'm slow and not very sure about my actions with linux, but I'm quite new with it, starting from zero,
till few month ago, the only thing I knew about linux were "cd" and "ls -l"
try to understand me big_smile

I'm trying to improve my knowledge big_smile

Offline

#30 2012-05-24 11:30:15

miky76
Member
From: Italy
Registered: 2011-10-27
Posts: 135

Re: [SOLVED] Partition 1 does not start on physical sector boundary.

with rsync I've copied everything into the 3rd partiotion i've made

i've lanched the command grub

but I get this message

[root@artemide ~]# grub
-bash: /sbin/grub: No such file or directory

i've tryed to reinstall it

[root@artemide ~]# pacman -Sy grub
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
resolving dependencies...
looking for inter-conflicts...
:: grub and grub2-common are in conflict. Remove grub2-common? [y/N] y
error: failed to prepare transaction (could not satisfy dependencies)
:: grub2-bios: requires grub2-common=1:2.00beta4

what's wrong now?

Offline

#31 2012-05-24 12:02:34

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: [SOLVED] Partition 1 does not start on physical sector boundary.

Are you trying to replace it with GRUB Legacy (ie. the grub package) or reinstall GRUB 2 (ie. the grub2-bios package)? If you're trying to reinstall it, try following the wiki: https://wiki.archlinux.org/index.php/GR … Arch_Linux

# pacman -S grub2-bios
# grub-install --directory=/usr/lib/grub/i386-pc --target=i386-pc --boot-directory=/boot --recheck --debug /dev/sda

"where /dev/sda is the destination of the installation (in this case the MBR of the first SATA disk)."


And don't use "pacman -Sy foo".

https://bbs.archlinux.org/viewtopic.php … 61#p802661

Running "pacman -S foo" is ok, especially after a full system update (-Syu). But "pacman -Sy foo" is bad and it's generally considered a bad practice because it can break things. Read the above narration.

Last edited by DSpider (2012-05-24 19:24:19)


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#32 2012-05-26 10:14:27

miky76
Member
From: Italy
Registered: 2011-10-27
Posts: 135

Re: [SOLVED] Partition 1 does not start on physical sector boundary.

Hi
I've copied back all  the datas I've backed up with rsync back into sdb3

I'm trying to install the bootloader (the one for gpt) into the sdb1

I've tryed with

grub-install --directory=/usr/lib/grub/i386-pc --target=i386-pc --boot-directory=/boot --recheck --debug /dev/sdb

or with

# chattr -i /boot/grub/i386-pc/core.img
# grub-install --directory=/usr/lib/grub/i386-pc --target=i386-pc --boot-directory=/boot --recheck --force --debug /dev/sdb1
# chattr +i /boot/grub/i386-pc/core.img

but without success

Offline

#33 2012-05-26 12:44:16

nomorewindows
Member
Registered: 2010-04-03
Posts: 3,362

Re: [SOLVED] Partition 1 does not start on physical sector boundary.

You should be able to install the bootloader with either grub or grub2, but the bootloader should just go in /dev/sdb.
Normally all you would need with grub is just grub-install /dev/sdb.  If it is stingy, which it might be in this case, grub-install --recheck /dev/sdb.
It looks like you are trying to use grub2.  You can just use regular grub by using pacman -R grub2-common grub2-bios and then pacman -S grub
Unless your machine is hung up on using uefi, you can get by with the simpler grub.


I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.

Offline

#34 2012-05-26 13:42:05

miky76
Member
From: Italy
Registered: 2011-10-27
Posts: 135

Re: [SOLVED] Partition 1 does not start on physical sector boundary.

pacman -R grub2-common grub2-bios 
pacman -S grub

everything fine till here

[root@artemide grub]# grub-install --recheck /dev/sdb
Probing devices to guess BIOS drives. This may take a long time.
Installation finished. No error reported.
This is the contents of the device map /boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.

(fd0)   /dev/fd0
(hd0)   /dev/sda
(hd1)   /dev/sdb
(hd2)   /dev/sdc
(hd3)   /dev/sdd

when i try to install the grub in /dev/sdb1

    GNU GRUB  version 0.97  (640K lower / 3072K upper memory)

 [ Minimal BASH-like line editing is supported.  For the first word, TAB
   lists possible command completions.  Anywhere else TAB lists the possible
   completions of a device/filename. ]

grub> root (hd1,0)
 Filesystem type unknown, partition type 0xee

grub>

the filesystem look like this in cgdisk

                                  cgdisk 0.8.4

                              Disk Drive: /dev/sdb
                           Size: 5860533168, 2.7 TiB

Part. #     Size        Partition Type            Partition Name
----------------------------------------------------------------
            1007.0 KiB  free space
   1        100.0 MiB   EFI System                Linux filesystem
   2        2.0 GiB     Linux swap                Linux swap
   3        24.4 GiB    Linux filesystem          Linux filesystem
   4        29.3 GiB    Linux filesystem          Linux filesystem
   6        1.8 TiB     Microsoft basic data
   5        942.1 GiB   Microsoft basic data
            455.5 KiB   free space

but if I check with Gparted they look

sdb1 ext2
sdb2 swap
sdb3 to 6 ext 4

shall I destroy them and do them again?

how can I proceed for installa the boot loader?

Offline

#35 2012-05-26 14:50:59

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: [SOLVED] Partition 1 does not start on physical sector boundary.

https://wiki.archlinux.org/index.php/GRUB

Note: The grub package does not support GPT disks, BTRFS filesystem and UEFI firmwares.


So you can't use GRUB Legacy. Only GRUB 2, BURG (which is a GRUB 2 fork) or Syslinux. After using GRUB 2 for about 2 years I ditched it for Syslinux because I didn't find it very K.I.S.S. I recommend you give it a shot. It's very easy to use and there's just one configuration file (like GRUB Legacy).

https://wiki.archlinux.org/index.php/Syslinux


PS: Some general grammar and punctuation wouldn't hurt either. This isn't Facebook, you know.


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#36 2012-05-26 14:54:36

Strike0
Member
From: Germany
Registered: 2011-09-05
Posts: 1,429

Re: [SOLVED] Partition 1 does not start on physical sector boundary.

I guess you get that error since Grub-legacy does not support GPT.
I would not destroy the partitions but try again with Grub2 as in the posts above.

Offline

#37 2012-05-27 00:21:34

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

Re: [SOLVED] Partition 1 does not start on physical sector boundary.

It looks as if you are trying to use EFI to boot?

1        100.0 MiB   EFI System                Linux filesystem

If you are, the EFI partition needs to be formatted differently - probably as fat32. If not, I'm not sure that it should think that you have an EFI partition...

You need to know whether you are trying to boot in EFI or BIOS mode and to tell people. For example, syslinux can't boot in EFI mode.

Last edited by cfr (2012-05-27 00:23:29)


CLI Paste | How To Ask Questions

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

Offline

#38 2012-05-27 13:37:02

miky76
Member
From: Italy
Registered: 2011-10-27
Posts: 135

Re: [SOLVED] Partition 1 does not start on physical sector boundary.

well, i'm but puzzled because cgdisk, shows the partitions as I stated in the previous post, but if I print the partition table with parted I see

Model: ATA ST3000DM001-9YN1 (scsi)
Disk /dev/sdb: 3001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:

Number  Start   End     Size    File system     Name              Flags
 1      1049kB  106MB   105MB   ext2            Linux filesystem  boot, legacy_boot
 2      106MB   2203MB  2097MB  linux-swap(v1)  Linux swap
 3      2203MB  28.4GB  26.2GB  ext4            Linux filesystem
 4      28.4GB  59.9GB  31.5GB  ext4            Linux filesystem
 6      59.9GB  1989GB  1929GB  ext4
 5      1989GB  3001GB  1012GB  ext4

that is actually what I was supposing it should be

So, I.ve installed syslinux, and from the OS in the USB, I've tryied to install it on the disk (the sdb one)

mount /dev/sdb1 /mnt/boot

pacman -S syslinux

mkdir /mnt/boot/syslinux
extlinux --install mnt/boot/syslinux 

sgdisk /dev/sdb --attributes=1:set:2

dd bs=440 conv=notrunc count=1 if=/usr/lib/syslinux/gptmbr.bin of=/dev/sdb

than I've created the info syslinux.cfg file

PROMPT 1
TIMEOUT 50
DEFAULT arch

LABEL arch
        LINUX ../vmlinuz-linux
        APPEND root=/dev/sda3 ro
        INITRD ../initramfs-linux.img

LABEL archfallback
        LINUX ../vmlinuz-linux
        APPEND root=/dev/sda3 ro
        INITRD ../initramfs-linux-fallback.img

then, after the reboot I'm getting this message, and I've tried to set /dev/sd-something, but without results

SYSLINUX 4.05 EDD .......
boot:
could not find kernel image: ../vmlinuz-linux

and actually, in the boot folder I do not see any vmlinuz-linux or image file like initramfs-linux.img or initramfs-linux-fallback.img

how can I create again the images?
do I have to use chroot and then mkinitcpio?

Offline

#39 2012-05-27 20:52:22

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

Re: [SOLVED] Partition 1 does not start on physical sector boundary.

Yes, you can use mkinitcpio to recreate the images - details at https://wiki.archlinux.org/index.php/Mkinitcpio but you are unlikely to want to know most of the contents of that page.

You seem to have both "boot" and "legacy_boot" enabled for partition 1. Are you sure this is correct? I don't think "boot" should be showing here. parted uses "boot" to represent what gdisk etc. more accurately describe as the marker for an EFI system partition. You are not using EFI to boot if this partition is formatted ext2. I don't know that the flag will harm anything but it is at least confusing.

"legacy_boot" is probably the one you want enabled here, assuming you are booting in BIOS (legacy) mode.


CLI Paste | How To Ask Questions

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

Offline

#40 2012-05-27 22:53:50

miky76
Member
From: Italy
Registered: 2011-10-27
Posts: 135

Re: [SOLVED] Partition 1 does not start on physical sector boundary.

cfr wrote:

You seem to have both "boot" and "legacy_boot" enabled for partition 1. Are you sure this is correct?

No, I'm not sure at all, I do not know how it should be.
I believe there is a bit mess with this partition.

what I want is to have a normal partition (ext2?) that boot arch linux, nothing else.

If I remove the boot with gparted, do you think it will be ok?
I do not know why this look like EFI if I check with cgdisk and ext2 if I check it with parted.
can I fix it or shall I destroy it and do it again?

Offline

#41 2012-05-27 23:28:38

nomorewindows
Member
Registered: 2010-04-03
Posts: 3,362

Re: [SOLVED] Partition 1 does not start on physical sector boundary.

You must give absolute paths in your syslinux.cfg file.  If boot files are all you have on the /boot partition with legacy grub it would just be /vmlinuz, etc.  But you are using EFI grub and the actual files are burried other some other directory along with some .c32 files.


I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.

Offline

#42 2012-05-28 07:09:46

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: [SOLVED] Partition 1 does not start on physical sector boundary.

Absolute paths are not really a requirement. Sure, you can explicitly use "/boot/vmlinuz-linux" and "/boot/initramfs-linux.img". But "../vmlinuz-linux" and "../initramfs-linux.img" will work the same. Works for me just fine:

LABEL arch
        MENU LABEL Arch Linux
        LINUX ../vmlinuz-linux
        APPEND root=UUID=978e3e81-8048-4ae1-8a06-aa727458e8ff ro quiet vga=current loglevel=3 ipv6.disable=1
        INITRD ../initramfs-linux.img

"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#43 2012-05-28 19:53:48

miky76
Member
From: Italy
Registered: 2011-10-27
Posts: 135

Re: [SOLVED] Partition 1 does not start on physical sector boundary.

Well,
I've deleted the sdb1 partition and did ti again, and now it look like this, using "parted"

(parted) print free
Model: ATA ST3000DM001-9YN1 (scsi)
Disk /dev/sdb: 3001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:

Number  Start   End     Size    File system     Name              Flags
        17.4kB  1049kB  1031kB  Free Space
 1      1049kB  106MB   105MB   ext2                              legacy_boot
 2      106MB   2203MB  2097MB  linux-swap(v1)  Linux swap
 3      2203MB  28.4GB  26.2GB  ext4            Linux filesystem
 4      28.4GB  59.9GB  31.5GB  ext4            Linux filesystem
 6      59.9GB  1989GB  1929GB  ext4
 5      1989GB  3001GB  1012GB  ext4
        3001GB  3001GB  466kB   Free Space

after if I was trying to rebuild the images, but without really any results

cd /mnt/oldarch
mount -t proc proc proc/
mount -t sysfs sys sys/
mount -o bind /dev dev/

mount /dev/sdb1 /mnt/oldarch/boot

chroot . /bin/bash

mkinitcpio -p linux

the result are several errors

[root@artemide /]# mkinitcpio -p linux
==> Building image from preset: 'default'
  -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
==> ERROR: Specified kernel image does not exist: `/boot/vmlinuz-linux'
==> Building image from preset: 'fallback'
  -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect
==> ERROR: Specified kernel image does not exist: `/boot/vmlinuz-linux'

maybe it's not the correct way to do it sad

Offline

#44 2012-05-28 21:04:10

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: [SOLVED] Partition 1 does not start on physical sector boundary.

Because you forgot to mount the separate /boot partition (which is /dev/sdb1 in your case).

https://wiki.archlinux.org/index.php/Ch … nging_Root

It's possible to mount filesystems after you've chrooted, but it's more convenient to do so beforehand.

So I think you should mount it before you run "chroot . /bin/bash" using:

# mount /dev/sdb1 boot/

"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#45 2012-05-28 21:13:51

nomorewindows
Member
Registered: 2010-04-03
Posts: 3,362

Re: [SOLVED] Partition 1 does not start on physical sector boundary.

You deleted your kernel in the process!
Just pacman -S linux to get it back (pacman -Qk linux will show this). 
The rest of your filesystem also has to be present when putting the kernel back in place.  It will need the rest of the kernel modules to build the initramfs image.

Last edited by nomorewindows (2012-05-28 21:14:53)


I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.

Offline

#46 2012-05-28 21:31:53

miky76
Member
From: Italy
Registered: 2011-10-27
Posts: 135

Re: [SOLVED] Partition 1 does not start on physical sector boundary.

nomorewindows wrote:

You deleted your kernel in the process!
Just pacman -S linux to get it back (pacman -Qk linux will show this). 
The rest of your filesystem also has to be present when putting the kernel back in place.  It will need the rest of the kernel modules to build the initramfs image.

This was the right one big_smile

cd /mnt/oldarch

mount /dev/sdb1 boot/

pacman -S linux 

mkinitcpio -p linux

rebooting, the arch linux starts (with some errors, but I can fix them) but starts!!!

THANK YOU EVERYBODY FOR YOUR HELP

Offline

#47 2012-05-28 23:42:33

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

Re: [SOLVED] Partition 1 does not start on physical sector boundary.

nomorewindows wrote:

You must give absolute paths in your syslinux.cfg file.  If boot files are all you have on the /boot partition with legacy grub it would just be /vmlinuz, etc.  But you are using EFI grub and the actual files are burried other some other directory along with some .c32 files.

The OP is using syslinux - not grub. I'm pretty sure the EFI designation is an error...


CLI Paste | How To Ask Questions

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

Offline

#48 2012-05-29 07:42:51

miky76
Member
From: Italy
Registered: 2011-10-27
Posts: 135

Re: [SOLVED] Partition 1 does not start on physical sector boundary.

Now that everything is working again, just one think I do not find anymore.

I had several user, not just root, now the only user is root.
not really a problem, I can make them again, but I'm just curious to know which file I didn't backed up.

Offline

#49 2012-05-29 08:50:54

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: [SOLVED] Partition 1 does not start on physical sector boundary.

Glad to hear it. Only 45 replies and a month later, but you eventually got there. This is learning at its best right here.

About the user thing, you probably had a separate /home partition which you forgot to backup.

Last edited by DSpider (2012-05-29 08:51:37)


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#50 2012-05-29 12:21:18

nomorewindows
Member
Registered: 2010-04-03
Posts: 3,362

Re: [SOLVED] Partition 1 does not start on physical sector boundary.

miky76 wrote:

Now that everything is working again, just one think I do not find anymore.

I had several user, not just root, now the only user is root.
not really a problem, I can make them again, but I'm just curious to know which file I didn't backed up.

/etc/passwd
/etc/shadow
/etc/group

Last edited by nomorewindows (2012-05-29 19:16:05)


I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.

Offline

Board footer

Powered by FluxBB