Announcement

Collapse
No announcement yet.

Decreasing windows partition's size and increasing kubuntu partition's size

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    "Highbred" should be "hybrid".

    I agree that most isos are such these days, but just thought I'd mention that the "isohybrid" command can make at least some isos into hybrid ones.

    Sent from my Vodafone Smart ultra 6 using Tapatalk
    Regards, John Little

    Comment


      #17
      Originally posted by Robert24 View Post
      I'm just a bit confused with the 3 last points:

      For 7), when I will recreate this swap partition, will there be a way to choose the type to be "linuxswap"?
      For 8), in which directory should I enter this command? And what does it do? What does ``Obtain the swap partitions new UUID" mean? From what I read on wikipedia, the UUID seems to be a kind of identifier generated automatically for each partition. But I don't really understand what is mean by obtaining a UUID. Is it creating one? Is it finding out which one is associated to the partition.
      For 9), I'm a bit confused about what we are trying to do.
      I'll have a go at answering your queries, Robert. Since we are all in different time zones (NZ for me and JLittle, around mid-day 1st Feb here):

      (7) -- Within Gparted or Kubuntu Partition Manager, when you create the partition you will have a choice of what file system to format the new partition with. Choose "Linux Swap".

      (8) -- A new UUID is automatically created when a partition is formatted. The last part of your question is correct: "Is it finding out which one is associated to the partition." <-- Yes.
      My swap partition UUID is: 49a34f8f-6d07-4bba-aee1-a58d1ca8fd0c. But, they are unique, yours will be different. You can get the new UUID from the partition properties dialog in the Partition Manager you are using. Or, as mr_raider suggested using the blkid command in a terminal. Copy and paste the UUID rather than typing it as it's easier and less chance of typos occurring. The reason we are doing this is covered next in (9).

      (9) -- Because you are recreating the swap partition the UUID will be changed in the process of doing this. BUT, the fstab file in the /etc folder is still using the original swap UUID and so it will cause problems when you boot/reboot the system as the system won't be able to find the original swap partition. SO, you need to edit the fstab file to correct this.

      Start a terminal and execute the following commands:

      Code:
      cd /etc
      
      sudo nano fstab
      Look for the line beginning with "# swap was on " below this line you will see a line beginning with UUID= (the long UUID will be here).

      Paste the new UUID over the old UUID. Don't change anything else.

      BTW, if you don't know yet, copying and pasting in a terminal requires holding down the Shift key as well as the Ctrl key. Like: Ctrl+Shift+V to paste.

      In the Nano editor finish with Ctrl+O to save the edited file and then Ctrl+X to exit Nano. Done.
      Desktop PC: Intel Core-i5-4670 3.40Ghz, 16Gb Crucial ram, Asus H97-Plus MB, 128Gb Crucial SSD + 2Tb Seagate Barracuda 7200.14 HDD running Kubuntu 18.04 LTS and Kubuntu 14.04 LTS (on SSD).
      Laptop: HP EliteBook 8460p Core-i5-2540M, 4Gb ram, Transcend 120Gb SSD, currently running Deepin 15.8 and Manjaro KDE 18.

      Comment


        #18
        (For reference) A note of this hybrid business:

        What is a Hybrid Image?

        We are used to downloading ISO images from Ubuntu mirrors whenever a new release comes out. At the same time when these images can be burnt directly to a CD-ROM disc, for creating a startup installation USB, one needs to use specific USB creation tools like 'Startup Disk Creator' (included by default in Ubuntu), 'UNetbootin', etc. With hybrid images, you can simply write the data -including the filesystem- of the image to a USB drive by using the 'dd' command. Notice that just copying its content, after mounting it, won't work, as it wouldn't copy the MBR and the partition table, as well as additional sectors at the end of the image.

        A major downside you have to consider is that this method will delete all data that was on the USB drive previously!

        After writing the image on the USB drive, you will have the remainder of it as unallocated space, and you can create a new partition and use it for storing your files on the drive as well, while at the same time you can use it as the install/live medium. Notice that this will not create a persistent drive. See the section "Adding the left out space to a new partition" near the bottom of this post. Also, if you want to create a persistent drive, see the most lower section.

        An advantage to note is that you'll have the real Ubuntu boot process (main boot options page etc.) as you have it when you boot a CD-ROM disc instead of the boot options you have when a UNetbootin created USB is booted.
        Also note (in the link) the limitation of using isohybrid.

        http://www.tuxgarage.com/2011/06/ubu...sc-images.html
        An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

        Comment


          #19
          Thank you to all of you for your help, I really appreciate it.

          I did the following. I turned off my computer. Plugged the usb key. Turned on my computer. But the menu was displaying the same options as before:

          Ubuntu
          Advanced options for Ubuntu
          Windows Boot Manager (on /dev/sda1)
          System setup

          So I think that something failed.

          I also noticed that the size of free space on my usb key didn't decrease when I did the dd thing, however one thing changed: what was appearing in KDE Partition Manager is not the same. Before there was a kind of ``normal entry" for my usb key (i.e. for each column (Partition, Type, Mount Point, Label, Size, Used) I had a normal indication). Now I have a message ``No valid partition table was found on this device", as you can see on this print screen:

          Click image for larger version

Name:	KDE_partition_manager_USB_01.02.18.jpg
Views:	1
Size:	47.5 KB
ID:	643743

          Now, when I go in Dolphin look what is on the USB key, it looks like there is actually some kubuntu on it:

          Click image for larger version

Name:	live_usb_dolphin.jpg
Views:	1
Size:	54.3 KB
ID:	643744

          But I don't know what I did wrong. A friend told me that maybe I should change something in the BIOS (or whatever the program which allows you to choose your operating system is called) such that it looks first for a usb key and then for something else. But I admit that I didn't get everything (and this friend is gone now). Maybe you will be more inspired.

          Anyway, thanks a lot for your help.

          Have a nice day (or sleep well depending where you live). In Switzerland its noon.

          Best

          Comment


            #20
            I'm not sure why your USB drive says there is no partition table present ... I'm pretty sure if the dd command did what it was supposed to there would be a partition table on the drive. If you have the USB drive inserted what does sudo parted -l give you now? Earlier in this thread (post #7) it showed as having an msdos partition table on /sdb. Compare the two readouts.

            Yes, your friend was right, you need to go into the BIOS and change the boot order so that the USB device is the first option to boot from. What you are getting now is the Grub boot loader menu which means it is booting straight off the hard drive first.

            BTW, if you choose the last option in that menu "System setup" you will land in the BIOS setup anyway. You need to find the boot options menu and juggle the options around to get the USB option at the top.

            Even if you leave the USB boot option as first on the boot menu it won't do any harm later because either the system will see there is no USB drive available and just skip to the next option instantly or if there is a USB drive present but there is no OS on it it will just ignore it and try the next option.

            After changing the boot options you will probably need to press the F10 key to exit the BIOS and make sure to save your changes you made. Some BIOS's have a special key you can press as the system is starting that let's you change the boot options 'on the fly' ... F9 might do that.
            Desktop PC: Intel Core-i5-4670 3.40Ghz, 16Gb Crucial ram, Asus H97-Plus MB, 128Gb Crucial SSD + 2Tb Seagate Barracuda 7200.14 HDD running Kubuntu 18.04 LTS and Kubuntu 14.04 LTS (on SSD).
            Laptop: HP EliteBook 8460p Core-i5-2540M, 4Gb ram, Transcend 120Gb SSD, currently running Deepin 15.8 and Manjaro KDE 18.

            Comment


              #21
              Thanks for your answer Rod J,

              If I enter
              sudo parted -l
              I obtain

              Code:
              Model: ATA SAMSUNG MZ7LN512 (scsi)
              Disk /dev/sda: 512GB
              Sector size (logical/physical): 512B/512B
              Partition Table: gpt
              Disk Flags: 
              
              Number  Start   End    Size    File system     Name                          Flags
              1      1049kB  274MB  273MB   fat32           EFI system partition          boot, hidden, esp
              2      274MB   290MB  16.8MB                  Microsoft reserved partition  msftres
              3      290MB   427GB  427GB   ntfs            Basic data partition          msftdata
              5      427GB   443GB  16.0GB  linux-swap(v1)
              6      443GB   511GB  67.9GB  ext4
              4      511GB   512GB  1049MB  ntfs            Basic data partition          hidden, diag
              
              Warning: The driver descriptor says the physical block size is 2048 bytes, but
              Linux says it is 512 bytes.
              Ignore/Cancel?
              I choosed Cancel but then some new lines appeared:

              Code:
              Ignore/Cancel? Cancel                                                     
              Model: SanDisk Cruzer Orbit (scsi)
              Disk /dev/sdb: 8004MB
              Sector size (logical/physical): 512B/512B
              Partition Table: unknown
              Disk Flags:
              This is new. As you can see in my post #7 it was different before: first I didn't have the warning


              Warning: The driver descriptor says the physical block size is 2048 bytes, but
              Linux says it is 512 bytes.
              Ignore/Cancel?


              and also, the partition table of my usb key was ``msdos" and not ``unknown", and finally I don't have ``disk flags" anymore for my usb key.

              It looks like things changed after I did the dd command presented in my post #11

              Any idea/suggestion? Should I still try to go in the bios changing these priorities?

              Comment


                #22
                Something has definitely gone wrong since you did the dd command earlier ... it seemed to work OK but apparently not. After writing to the drive with dd did you unmount the USB drive before removing it? If not, it might not have finalised the operation. You could try doing the dd operation again, it may have just been a glitch in the process.

                It won't hurt to try setting the BIOS to boot the USB drive first anyhow.
                Desktop PC: Intel Core-i5-4670 3.40Ghz, 16Gb Crucial ram, Asus H97-Plus MB, 128Gb Crucial SSD + 2Tb Seagate Barracuda 7200.14 HDD running Kubuntu 18.04 LTS and Kubuntu 14.04 LTS (on SSD).
                Laptop: HP EliteBook 8460p Core-i5-2540M, 4Gb ram, Transcend 120Gb SSD, currently running Deepin 15.8 and Manjaro KDE 18.

                Comment


                  #23
                  Robert's post #19:

                  But the menu was displaying the same options as before:
                  Ubuntu
                  Advanced options for Ubuntu
                  Windows Boot Manager (on /dev/sda1)
                  System setup
                  So, that looks OK to me. What's wrong with that?

                  No partition table? That might be the case -- That is OK. I'm really forgetting the background info here, but dd copies that CD/USB hybrid BOOTABLE image, it is all there, as is. You may not (you probably will not) see a recognizable partition table.

                  I have a live USB for Kubuntu 16.04.

                  When I plug it in, and select Open with File Manager from the options that pop up, I see the usual live files (folders, actually), like these:
                  boot, casper, EFI, isolinux, pics, preseed, pool, ubuntu,Readme, and so on and on.

                  And if I plug in the USB and open GParted to see the partition table and partitions and filesystems, I get these messages:

                  File system unallocated.
                  14.65 GiB unallocated
                  (In other words, it says there is NOTHING on my 16 GB USB flash drive! But it is all there, anyway.)
                  And I get this:


                  Warning:
                  /dev/sdb contains GPT signatures, indicating that it has a GPT table. However, it does not have a valid fake msdos partition table, as it should. Perhaps it was corrupted -- possibly by a program that doesn't understand GPT partition tables. Or perhaps you deleted the GPT table, and are now using an msdos partition table. Is this a GPT partition table?
                  (I said "No," btw.)

                  My USB works perfectly, as it should, notwithstanding the unusual messages and the lack of a familiar, standard partition table, and so on.
                  An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                  Comment


                    #24
                    Maybe the USB key is corrupted by a bunch of garbage on it? The dd commands should overwrite everything, though. Sometimes, I take the time to "refresh" a flash drive by zero-ing it out. If the USB is seen by my OS as sdx, I do this:

                    Code:
                    sudo dd if=/dev/zero of=/dev/sdx bs=4096
                    But ... I really don't think this is necessary (if doen't hurt, though -- it "cleans" things up).

                    Btw, if you do this, you will not see any progress as the dd writes zeros to the USB, not until it is finished and then it gives you a report. (There are simple ways to get a progress utility for dd, but let's not go there at the moment.) It may take awhile to finish! Like, maybe 10 minutes up to 30 minutes?
                    An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                    Comment


                      #25
                      Thanks a lot for all this amazing support, I'm really grateful!

                      Concerning the dd command, I thought that it was finished because the terminal gave me the output that I copied in my message #11 and allowed me to enter new commands. Is it possible that the thing was still running?

                      @Rod J
                      Rod J post #22
                      After writing to the drive with dd did you unmount the USB drive before removing it? If not, it might not have finalised the operation.
                      Well, usually I do, but I cannot say with 100% certitude that I did it. I guess I will redo this dd. Thanks for your help Rod J.

                      @Qqmike
                      Qqmike post #23
                      So, that looks OK to me. What's wrong with that?
                      Well I was expecting to be able to boot the Kubuntu on my USB key, i.e. I was expecting something like (but I DID NOT SEE THAT):

                      Ubuntu
                      Advanced options for Ubuntu
                      Windows Boot Manager (on /dev/sda1)
                      System setup
                      Ubuntu live key

                      Again, I have no experience at all with this kind of manipulation using GRUB. Someone did the installation of linux for me (I was there but at the time it was like looking at Chinese characters (no offense meant, it's just that I don't speak Mandarin at all)). So I don't really know how this is going to look like. I was imagining that there would be a new option (like above), that would boot another Kubuntu session. If it's not the case, how am I supposed to use this usb live key?

                      One more question: in

                      Code:
                      sudo dd if=/dev/zero of=/dev/sdx bs=4096
                      what's the deal with the bs? I looked online and it stands for block size. From what I understood, linux chops its memory into blocks and this is the size in bite of one block. But why 4096? I used

                      bs=16M

                      but only because I found this option in the tutorial that I used. Is it important? Should I keep it? Or change it?

                      Comment


                        #26
                        Concerning the dd command, I thought that it was finished because the terminal gave me the output that I copied in my message #11 and allowed me to enter new commands. Is it possible that the thing was still running?
                        No, not possible -- you did it right.

                        Well I was expecting to be able to boot the Kubuntu on my USB key, i.e. I was expecting something like (but I DID NOT SEE THAT):

                        Ubuntu
                        Advanced options for Ubuntu
                        Windows Boot Manager (on /dev/sda1)
                        System setup
                        Ubuntu live key
                        I would choose the first option: Ubuntu, and then see if you are offered two suboptions (like Try it or Install it). Btw, "System setup" -- I think -- gets you into your computer's BIOS/UEFI setup menus.

                        But why 4096? I used
                        bs=16M
                        but only because I found this option in the tutorial that I used. Is it important? Should I keep it? Or change it?
                        You can choose ANY block size (bs) you want. You did OK using 16M the way you did, no problems with that. I just picked 4096 arbitrarily, out of habit. People who like to play with dd experiment, trying different block sizes bs, trying to see which bs values result in dd completing faster. (Sometimes you get a curve, where as you increase the bs, dd finished faster, but as you keep increasing bs, dd takes longer; and then as you increase bs further, you find that dd finishes faster -- like a parabola curve. BUT ...let's not get side-tracked here with esoterics!)
                        An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                        Comment


                          #27
                          Hybrid ISOs "burned" to USB keys will always be misidentified by parted or gparted. You will always get an error and the size will always be reported wrong. Don't waste time trouble shooting this.

                          What happened is that you are failing to boot the USB key. Make sure you go in your firmwar/BIOS, while the key is plugged in, and set the USB key as first.

                          If that doesn't work, boot your PC with the installed OS, and teh USB key plugged in, open a terminal and type

                          Code:
                          sudo efibootmgr-v
                          And paste the results.

                          Comment


                            #28
                            Originally posted by Qqmike View Post
                            Maybe the USB key is corrupted by a bunch of garbage on it? The dd commands should overwrite everything, though. Sometimes, I take the time to "refresh" a flash drive by zero-ing it out. If the USB is seen by my OS as sdx, I do this:

                            Code:
                            sudo dd if=/dev/zero of=/dev/sdx bs=4096
                            But ... I really don't think this is necessary (if doen't hurt, though -- it "cleans" things up).

                            Btw, if you do this, you will not see any progress as the dd writes zeros to the USB, not until it is finished and then it gives you a report. (There are simple ways to get a progress utility for dd, but let's not go there at the moment.) It may take awhile to finish! Like, maybe 10 minutes up to 30 minutes?
                            some times it is nesasary to zero it out ,,I have had "dd" clones fail once or twice becose of leftovers on the stick .

                            @Robert24 ,,,do try it first however before you try zeroing the stick ,,,,you half to find the right Fkey to display the drive selection boot menu to boot it .

                            and it dose not hurt to run "sync" after the "dd"finishes to make sure it all got done ,,,,+ do not have the stick mounted/opened before "dding" it

                            VINNY
                            i7 4core HT 8MB L3 2.9GHz
                            16GB RAM
                            Nvidia GTX 860M 4GB RAM 1152 cuda cores

                            Comment


                              #29
                              (dd, btw, will run mounted or unmounted.)
                              An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                              Comment


                                #30
                                Thanks a lot for your help! I will try to answer to all of you in order

                                @Qqmike
                                Qqmike post #26
                                I would choose the first option: Ubuntu, and then see if you are offered two suboptions (like Try it or Install it).
                                I tried that but I only get the ususal kubuntu session.
                                And you're right concerning the ``System setup".

                                @mr_raider
                                I went in the BIOS and try to see if I could change the priority but I don't know how to do it. I took a couple of pictures of the screen with my phone:
                                If the usb stick is not plugged in I have this screen:

                                Click image for larger version

Name:	WP_20180202_11_12_45_Pro.jpg
Views:	1
Size:	60.8 KB
ID:	643745

                                If I have the usb stick I get something slightly different (see first entry):

                                Click image for larger version

Name:	WP_20180202_11_36_14_Pro.jpg
Views:	1
Size:	70.0 KB
ID:	643746

                                And if I click enter I can see this

                                Click image for larger version

Name:	WP_20180202_11_37_03_Pro.jpg
Views:	1
Size:	71.9 KB
ID:	643747

                                Could it be that I should change the ``Boot order lock"? For now it is ``Disabled". I can choose ``Enabled".

                                I'm just a bit afraid of screwing up something.

                                Coming back to the command that you advised me to use, I entered in the terminal
                                Code:
                                sudo efibootmgr -v
                                and I had the following output:
                                Code:
                                Timeout: 2 seconds
                                BootOrder: 0001,0000,0017,0018,0019,001A,001B,001C,001D,0022
                                Boot0000* Windows Boot Manager  HD(1,GPT,5e5b7e94-15a4-4725-90dc-0c296482f51b,0x800,0x82000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)WINDOWS...x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}...
                                Boot0001* ubuntu        HD(1,GPT,5e5b7e94-15a4-4725-90dc-0c296482f51b,0x800,0x82000)/File(\EFI\ubuntu\shimx64.efi)
                                Boot0010  Setup FvFile(721c8b66-426c-4e86-8e99-3457c46ab0b9)
                                Boot0011  Boot Menu     FvFile(126a762d-5758-4fca-8531-201a7f57f850)
                                Boot0012  Diagnostic Splash Screen      FvFile(a7d8d9a6-6ab0-4aeb-ad9d-163e59a7a380)
                                Boot0013  Lenovo Diagnostics    FvFile(3f7e615b-0d45-4f80-88dc-26b234958560)
                                Boot0014  Startup Interrupt Menu        FvFile(f46ee6f4-4785-43a3-923d-7f786c3c8479)
                                Boot0015  Rescue and Recovery   FvFile(665d3f60-ad3e-4cad-8e26-db46eee9f1b5)
                                Boot0016  MEBx Hot Key  FvFile(ac6fd56a-3d41-4efd-a1b9-870293811a28)
                                Boot0017* USB CD        VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,86701296aa5a7848b66cd49dd3ba6a55)
                                Boot0018* USB FDD       VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,6ff015a28830b543a8b8641009461e49)
                                Boot0019* NVMe0 VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,001c199932d94c4eae9aa0b6e98eb8a400)
                                Boot001A* ATA HDD1      VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,91af625956449f41a7b91f4f892ab0f602)
                                Boot001B* ATA HDD0      VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,91af625956449f41a7b91f4f892ab0f600)
                                Boot001C* USB HDD       VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,33e821aaaf33bc4789bd419f88c50803)
                                Boot001D* PCI LAN       VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,78a84aaf2b2afc4ea79cf5cc8f3d3803)
                                Boot001E* IDER BOOT CDROM       PciRoot(0x0)/Pci(0x16,0x2)/Ata(0,1,0)
                                Boot001F* IDER BOOT Floppy      PciRoot(0x0)/Pci(0x16,0x2)/Ata(0,0,0)
                                Boot0020* ATA HDD       VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,91af625956449f41a7b91f4f892ab0f6)
                                Boot0021* ATAPI CD      VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,aea2090adfde214e8b3a5e471856a354)
                                Boot0022* PCI LAN       VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,78a84aaf2b2afc4ea79cf5cc8f3d3803)
                                @vinnywright
                                post #28
                                @Robert24 ,,,do try it first however before you try zeroing the stick ,,,,you half to find the right Fkey to display the drive selection boot menu to boot it .

                                and it dose not hurt to run "sync" after the "dd"finishes to make sure it all got done ,,,,+ do not have the stick mounted/opened before "dding" it
                                How am I supposed to ``zero the stick"? Does it mean remove everything it contains? I didn't do it because there were some configuration files on it which were already installed on the key when I bought it (and as I don't know what they are for, I assumed it was better not touching them). Maybe this is the root of the problem.
                                Also what does ``run "sync"" mean?

                                Have a nice day!

                                Comment

                                Working...
                                X