resize btrfs partition

No.
root should be set to the root partition of course.

Btw, are you sure that msdos6 is /root and not /?
There is a difference.
/root is the root user’s home directory, whereas / is the system’s root partition.
On a standard install, /root is just a directory on /, no separate partition.

ye*s *​I mean / of course

I’m having a funny problem, since I’ve my boot and / are on different parition so when I add grub entry to grub.cfg of that new entry it was unable to boot that system - initrd, vmlinuz are on /boot partition and the / is on the other so set root=hd0,msdos6 and the boot is hd0,msdo7. So I try to copy that files to /boot (msdos6) but I’ve this message

cp: cannot create regular file ‘/run/media/root/suse1-root/boot/vmlinux-3.14.0-23.gfa168d7-desktop.gz’: No space left on device

 

so what’s the solution chroot and then copy that files??

No.
Isn’t the message clear enough? There is not have enough space on the partition where you try to copy vmlinux-3.14.0-23.gfa168d7-desktop.gz.
Free up enough space first.

Check that the correct partition is mounted at /run/media/root/suse1-root/boot/.

But why do you need to copy the kernel to /boot? Shouldn’t it already be there?

PS: If I read that correctly, you are now trying to copy the kernel to the boot directory on your / partition.
That shouldn’t be necessary. Just tell grub to load the kernel from the /boot partition in the menu.lst entry, i.e. something like this:

kernel (hd0,7)/vmlinuz-3.11.10-7-desktop root=/dev/sda7    resume=/dev/sdb2 splash=silent quiet showopts
initrd (hd0,7)/initrd-3.11.10-7-desktop

Could you post your menu.lst, please?

PPS: I hope you do know that menu.lst is grub1’s menu config. So are you really installing grub1 now?
You always talked about grub2 before.

so I chrooted but from chroot I can’t find the other partitions especially the msdos7 (the boot), I tried

 mount /dev/sda7 /run 

or

 mount /hd0,7 /run 

, no sucess still what shall I do? and of course there’s enough free space on / 13.x GB output of df-h

  /dev/sda6        26G   14G   13G  52% /run/media/root/suse1-root  

No.
Isn’t the message clear enough? There’s not sufficient space on /run/media/root/suse1-root/boot/ to copy the kernel there.
Free up some space.
Check that you have mounted the right partition there.

Btw, it shouldn’t be necessary to copy the kernel to your / partition, grub2 should be able to load it from the /boot partition.

Maybe do try to change that set line to “set root=‘hd0,msdos7’”. I misunderstood your question about this.

DON’T MOUNT ANYTHING TO /run !!!

Use some other mount point, like /mnt f.e.

And please don’t confuse grub’s notation with the linux kernel’s.
Linux doesn’t understand “/hd0,7”.

And how are you booting now?
If it’s from USB, /dev/sda might actually be the USB-Stick/drive, so that would explain why you can’t find your partitions.
Run “fdisk -l” to check.

the message is clear but, it’s caused by smth else, not lack of the space,

 df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda9        20G  4.8G   14G  26% /
devtmpfs        1.9G   24K  1.9G   1% /dev
tmpfs           1.9G  1.3M  1.9G   1% /dev/shm
tmpfs           1.9G  4.5M  1.9G   1% /run
tmpfs           1.9G     0  1.9G   0% /sys/fs/cgroup
tmpfs           1.9G  4.5M  1.9G   1% /var/run
tmpfs           1.9G  4.5M  1.9G   1% /var/lock
/dev/sda10      8.0G  361M  7.6G   5% /home
/dev/sda7       585M  246M  297M  46% /run/media/root/suse1-boot
/dev/sda6        26G   14G   13G  52% /run/media/root/suse1-root
/dev/sda1       197G   99G   88G  54% /run/media/root/data

dev/sda6 is / partition of suse1 which is the “old” tumbleweed system and right now I’m on clean install /dev/sda9

but I think there must be way to boot it anyway - set root=hd0,6 (the / partition) and specify that initrd and vmlinuz are somwhere else in theese lines of grub.cfg file

 
linux   /vmlinuz-3.14.0-23.gfa168d7-desktop root=UUID=7b9d027c-1093-466c-8be4-aea8f94863bc   quiet quiet liveinstall resume=/dev/disk/by-id/ata-WDC_WD7500BPKT-00PK4T0_WD-WXF1E32MVUC9-part5 splash=silent quiet showopts
 echo    'Loading initial ramdisk ...'
initrd  /initrd-3.14.0-23.gfa168d7-desktop              
 

 

Well, if you have /initrd-xxx and /vmlinuz-xxx in there, you have to tell grub2 to use your /boot partition as root of course, so it can find those files. (“set root=hd0,msdos7”)

openSUSE’s / partition is specified in the kernel command line:

linux   /vmlinuz-3.14.0-23.gfa168d7-desktop root=UUID=7b9d027c-1093-466c-8be4-aea8f94863bc   quiet quiet liveinstall resume=/dev/disk/by-id/ata-WDC_WD7500BPKT-00PK4T0_WD-WXF1E32MVUC9-part5 splash=silent quiet showopts

You might have to change this (try /dev/sda6), I can’t know what UUID your / partition has.

On 2014-04-25 13:06, roberto68 wrote:
>
> but I think there must be way to boot it anyway - set root=hd0,6 (the /
> partition) and specify that initrd and vmlinuz are somwhere else in
> theese lines of grub.cfg file
> Code:
> --------------------
>
> linux /vmlinuz-3.14.0-23.gfa168d7-desktop root=UUID=7b9d027c-1093-466c-8be4-aea8f94863bc quiet quiet liveinstall resume=/dev/disk/by-id/ata-WDC_WD7500BPKT-00PK4T0_WD-WXF1E32MVUC9-part5 splash=silent quiet showopts
> echo ‘Loading initial ramdisk …’
> initrd /initrd-3.14.0-23.gfa168d7-desktop
>
>
>
> --------------------

You have a separate boot partition. Both the kernel and initrd must
reside in that partition, same one as the grub files, not in the root
partition - which is btrfs, I understand. The boot partition is the only
one that grub can access.

A different issue is that the kernel has to be informed of where the
root filesystem is.

On the other hand, are you sure you want the “liveinstall” option in there?

Assuming this is grub2, this is what I have (also with a separate grub
partition)


>         set root='hd0,msdos3'
>         if  x$feature_platform_search_hint = xy ]; then
>           search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3 --hint='hd0,msdos3'  6d9d4270-3fd1-4027-9316-c614d6c090e4
>         else
>           search --no-floppy --fs-uuid --set=root 6d9d4270-3fd1-4027-9316-c614d6c090e4
>         fi
>         echo    'Loading Linux 3.11.10-7-desktop ...'
>         linux   /vmlinuz-3.11.10-7-desktop root=UUID=00eb9a40-d067-459e-a22f-1d3b667dddbb   resume=/dev/disk/by-label/b_swap splash=verbose showopts
>         echo    'Loading initial ramdisk ...'
>         initrd  /initrd-3.11.10-7-desktop


6d9d4270-3fd1-4027-9316-c614d6c090e4 -> ../../sdc3
00eb9a40-d067-459e-a22f-1d3b667dddbb -> ../../sdc9

sdc3 is my boot partition (one of them), and sdc9 is my root partition
(one of them):


Telcontar:~ # mount | grep "sdc3\|sdc9"
/dev/sdc9 on /other/test_a2 type ext4 (rw,relatime,data=ordered)
/dev/sdc3 on /other/test_a2/boot type ext2 (rw,relatime)
Telcontar:~ #

But you can not configure this in /boot/grub2/grub.cfg, because it is
automatically generated. Nor in /etc/default/grub either. I fact, I
don’t know where, except that YaST does it.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

Well, why would it say “No space left” then?
Either you had the wrong drive/partition (or none at all) mounted at /run/media/root/suse1-root when you did the copy, or the filesystem is corrupt.

You could try to run “fsck -f /dev/sda7”.

But again, copying the kernel to / should not be necessary.

And with your current grub.cfg, grub wouldn’t find it in /run/media/root/suse1-root/boot either anyway.

 fsck -f /dev/sda7                                                                                                                                                                                               
fsck from util-linux 2.23.2                                                                                                                                                                                                                  
e2fsck 1.42.8 (20-Jun-2013)                                                                                                                                                                                                                  
Pass 1: Checking inodes, blocks, and sizes                                                                                                                                                                                                   
Pass 2: Checking directory structure                                                                                                                                                                                                         
Pass 3: Checking directory connectivity                                                                                                                                                                                                      
Pass 4: Checking reference counts                                                                                                                                                                                                            
Pass 5: Checking group summary information                                                                                                                                                                                                   
suse1-boot: 405/39040 files (1.2% non-contiguous), 69322/156160 blocks      
 

what does it mean that 1.2% non contiguous ??

That means, that 1.2% of the files do not consist of one contiguous space on the disk, i.e. they are “fragmented”.

This is merely for information.
Shouldn’t have anything to do with your problem though.

  /dev/disk/by-id/ata-WDC_WD7500BPKT-00PK4T0_WD-WXF1E32MVUC9-part12 /boot                
/dev/disk/by-id/ata-WDC_WD7500BPKT-00PK4T0_WD-WXF1E32MVUC9-part5  
 

what does part12 and part 5 mean ??? /boot is sda7 and / sda6 and I don’t even’ve sda12 partition or does it mean smth else?

/dev/disk/by-id/ata-xxx-part12 should normally be a symlink to /dev/sda12 (if the disk xxx is /dev/sda), yes.

Maybe that entry is wrong? Where do you have it? In /etc/fstab?

Post the output of “ls -l /dev/by-id/ata-WDC*” please.

Well, back in post#10 (http://forums.opensuse.org/showthread.php/495602-resize-btrfs-partition?p=2635517#post2635517), you actually DID have a /dev/sda12 mounted to /boot.

So I suppose you forgot to edit the fstab accordingly after re-partitioning your hard disk.

here’s whole entry for the “old” system in grub.cfg

   menuentry 'openSUSE 13.1, with Linux 3.14.0-23.gfa168d7-desktop' --class 'opensuse-13-1' --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.14.0-23.gfa168d7-desktop-advanced-7b9d027c-1093-466c-8be4-aea8f94863bc' {
                load_video
                set gfxpayload=keep
                insmod gzio
                insmod part_msdos
                insmod ext2
                set root='hd0,msdos7'
                if  x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos7 --hint-efi=hd0,msdos7 --hint-baremetal=ahci0,msdos7 --hint='hd0,msdos7'  fc017ea6-21ae-4dd9-ac23-53756ffeb8f0
                else
                  search --no-floppy --fs-uuid --set=root fc017ea6-21ae-4dd9-ac23-53756ffeb8f0
                fi
                echo    'Loading Linux 3.14.0-23.gfa168d7-desktop ...'
                linux   /vmlinuz-3.14.0-23.gfa168d7-desktop root=LABEL=suse1-root   quiet quiet liveinstall resume=/dev/disk/by-id/ata-WDC_WD7500BPKT-00PK4T0_WD-WXF1E32MVUC9-part5 splash=silent quiet showopts
                echo    'Loading initial ramdisk ...'
                initrd  /initrd-3.14.0-23.gfa168d7-desktop

 

an here’s fdisk -l

 fdisk -l
                                                                                                                                                                                                                                             
Disk /dev/sda: 750.2 GB, 750156374016 bytes, 1465149168 sectors                                                                                                                                                                              
Units = sectors of 1 * 512 = 512 bytes                                                                                                                                                                                                       
Sector size (logical/physical): 512 bytes / 4096 bytes                                                                                                                                                                                       
I/O size (minimum/optimal): 4096 bytes / 4096 bytes                                                                                                                                                                                          
Disk label type: dos                                                                                                                                                                                                                         
Disk identifier: 0x0005ba8f                                                                                                                                                                                                                  
                                                                                                                                                                                                                                             
   Device Boot      Start         End      Blocks   Id  System                                                                                                                                                                               
/dev/sda1            2048   418625535   209311744   83  Linux                                                                                                                                                                                
/dev/sda2   *   418625536  1465147391   523260928    f  W95 Ext'd (LBA)                                                                                                                                                                      
/dev/sda5       418627584   429129726     5251071+  82  Linux swap / Solaris                                                                                                                                                                 
/dev/sda6       429129728   483653631    27261952   83  Linux                                                                                                                                                                                
/dev/sda7       483655680   484904959      624640   83  Linux                                                                                                                                                                                
/dev/sda8       484909056   591519743    53305344   83  Linux                                                                                                                                                                                
/dev/sda9       591521792   633475071    20976640   83  Linux                                                                                                                                                                                
/dev/sda10      633477120   650713087     8617984   83  Linux

  

and here’s fstab

  cat fstab
LABEL=suse2-root     /                    ext4       acl,user_xattr        1 1
LABEL=suse2-home     /home                ext4       defaults              1 2
/dev/disk/by-id/ata-WDC_WD7500BPKT-00PK4T0_WD-WXF1E32MVUC9-part5 swap                 swap       defaults              0 0
LABEL=data       /run/media/robert/data   ext4       defaults              0 1

  

So? Where do you have that “/dev/disk/by-id/ata-WDC_WD7500BPKT-00PK4T0_WD-WXF1E32MVUC9-part12 /boot” you asked about in your previous post now?

What’s the state now?
What have you tried to do?

What happens exactly when you try to boot?
Do you get any error messages?

Please don’t just throw random files/console output at us without any comments.
How should I or anybody guess what’s going on on your system?

One thing I noticed:

                linux   /vmlinuz-3.14.0-23.gfa168d7-desktop root=LABEL=suse1-root   quiet quiet liveinstall resume=/dev/disk/by-id/ata-WDC_WD7500BPKT-00PK4T0_WD-WXF1E32MVUC9-part5 splash=silent quiet showopts

I’m not sure whether that “LABEL=xxx” notation works here.
Try to use /dev/sda6 as I already proposed (provided that /dev/sda6 is still your / partition of course).

And I guess you should add an entry for /boot to your fstab as well.
This shouldn’t matter for booting, but without it you won’t be able to install any kernel updates (actually you may be able to, but it might break your boot).

nothin changed /dev/sda6 is my / and /dev/sda7 is /boot, grub & initrd & vmlinuz are in /dev/sda7. But recently I’ve realized that /dev/sda7 is hd0,6 or hd0,msdos6, cause counting start from hd0,0