Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


★ VirMach ★ Black Friday & Cyber Week 2018 ★ RAID 10 SSD ★ OpenVZ & KVM ★ Check inside for offers! - Page 307
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

★ VirMach ★ Black Friday & Cyber Week 2018 ★ RAID 10 SSD ★ OpenVZ & KVM ★ Check inside for offers!

1304305307309310547

Comments

  • Black-friday sale to French fries?... Is that a server name? What's the specification?

  • @VirMach said:

    ben47955 said: Please move your discussion to 2018 thread, thanks

    I can see how it can be annoying to have it bumped up, but hey, portions of the sale are still there to grab and this one post won't make any difference a few minutes from the other.

    (edit) Actually let's move it over because I'm sure there will be some responses.

    This was mostly a joke to get more post in the 2018 thread. The bumping of 2019 don't annoy me and I absolutely didn't want to prevent any from stopping bumping it. Sorry for misunderstand. I shouldn't have written this comment. Sorry about that.

  • I have an idea!

    @FAT32 please merge 2019 and 2018 topics (vanilla even allows that?) and we will have 250+ pages! This is not cheating, right?

  • How to broke Vanilla

  • Anyone watch Mr Robot?

  • I did, one season or two and get bored

  • that show has its moments ...

  • But yeah, go tired of all the wtf you don't understand without explanation

    Thanked by 1uptime
  • Ok now I want french fries again.

    With a fried egg or hot dog or chicken... or all of them.

    Or pollo a la brasa.

    10AM

    Thanked by 1uptime
  • I want a beer before my exam. Rum after.

  • @plumberg - here are some notes on using the rescue image to do the needful so as to add a swap partition. Note that I don't know whether this will make a difference for you actually being able to install whatever ISO on your 128 MB ram KVM deal, but maybe it will be useful info for you in any case.

    I'm doing this on a 512 MB ram KVM Lite with Debian 9 template. It came with a swap partition already setup, but for the purposes of testing I removed the swap partition and resized the / filesystem to fill the whole disk as a starting point.

    First thing, boot into rescue mode from the solusVM panel - it will tell you a root password to use, and you can ssh to the rescue image.

    Next run fdisk -l - here's what I see on my system:

    rescue # fdisk -l
    Disk /dev/vda: 15 GiB, 16106127360 bytes, 31457280 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    Disk identifier: 0x4cd40c9a
    
    Device     Boot Start      End  Sectors Size Id Type
    /dev/vda1        2048 31457279 31455232  15G 83 Linux
    
    
    
    
    Disk /dev/vdb: 1.1 GiB, 1181115904 bytes, 2306867 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    Disk identifier: 0xb52fd1c0
    
    Device     Boot Start     End Sectors  Size Id Type
    /dev/vdb1  *     2048 2304511 2302464  1.1G 83 Linux
    

    The /dev/vdb is the rescue partition

    We'll want to be working with /dev/vda - our agenda will be to resize the filesystem, then delete / recreate a smaller root partition, and then add a swap partition in the extra space we now have available on the disk.

  • Thanked by 1uptime
  • uptimeuptime Member
    edited December 2019

    before we get too far into the weeds with resize2fs and fdisk we should probably first mount the root partition to see how much room we have to play with. I'm assuming you'll be okay with a swap partition of 256 MB but if you want to try something smaller or larger then go for it. (I generally prefer not to actually use swap but I will usually setup a small swap partition just in case it helps some braindead software feel better about itself or whatever)

    anyway ...

    rescue # mount /dev/vda1 /mnt
    rescue # df -h /mnt
    Filesystem      Size  Used Avail Use% Mounted on
    /dev/vda1        15G  1.1G   13G   8% /mnt
    rescue # umount /mnt
    

    Looks like I need at least about 1.1 GB for my root filesystem, and I've got about 15 GB to play with.

    So since I only want 256 MB for the swap, and I've got 15 GB on the disk, let's just resize the filesystem on /dev/vda1 to 14.5 GB.

    I'll specify the size in MB when I run resize2fs so let's calculate that now for future reference

    14.5 * 1024 = 14848

    Before I run resize2fs I need to do an fsck -f on /dev/vda1

    rescue # fsck -f /dev/vda1
    fsck from util-linux 2.29.2
    e2fsck 1.43.4 (31-Jan-2017)
    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
    /dev/vda1: 36450/979200 files (8.7% non-contiguous), 352093/3931904 blocks
    

     

    rescue # resize2fs /dev/vda1 14848M
    resize2fs 1.43.4 (31-Jan-2017)
    Resizing the filesystem on /dev/vda1 to 3801088 (4k) blocks.
    The filesystem on /dev/vda1 is now 3801088 (4k) blocks long.
    

    Next we'll delete and recreate the actual /dev/vda1 partition so it is 14.5 GB - and then we'll add a second partition and set it as swap

    Thanked by 2FrankZ plumberg
  • Thanked by 2uptime FrankZ
  • uptimeuptime Member
    edited December 2019

    now we're going to use fdisk to do the needful on /dev/vda

    rescue # fdisk /dev/vda                                                         
                                                                                    
    Welcome to fdisk (util-linux 2.29.2).                                           
    Changes will remain in memory only, until you decide to write them.             
    Be careful before using the write command.                                      
                                                                                    
                                                                                    
    Command (m for help): p                                                         
    Disk /dev/vda: 15 GiB, 16106127360 bytes, 31457280 sectors                      
    Units: sectors of 1 * 512 = 512 bytes                                           
    Sector size (logical/physical): 512 bytes / 512 bytes                           
    I/O size (minimum/optimal): 512 bytes / 512 bytes                               
    Disklabel type: dos                                                             
    Disk identifier: 0x4cd40c9a                                                     
                                                                                    
    Device     Boot Start      End  Sectors Size Id Type                            
    /dev/vda1        2048 31457279 31455232  15G 83 Linux                           
                                                                                    
    Command (m for help): d                                                         
    Selected partition 1                                                            
    Partition 1 has been deleted.                                                   
                                                                                    
    Command (m for help):                                                           
                                                                                    
                                                                                    
    Command (m for help): n                                                         
    Partition type                                                                  
       p   primary (0 primary, 0 extended, 4 free)                                  
       e   extended (container for logical partitions)                              
    Select (default p):                                                             
                                                                                    
    Using default response p.
    
    Partition number (1-4, default 1):
    First sector (2048-31457279, default 2048):
    Last sector, +sectors or +size{K,M,G,T,P} (2048-31457279, default 31457279): +14848M
    
    Created a new partition 1 of type 'Linux' and of size 14.5 GiB.
    Partition #1 contains a ext3 signature.
    
    Do you want to remove the signature? [Y]es/[N]o: n
    
    Command (m for help): n
    Partition type
       p   primary (1 primary, 0 extended, 3 free)
       e   extended (container for logical partitions)
    Select (default p):
    
    Using default response p.
    Partition number (2-4, default 2):
    First sector (30410752-31457279, default 30410752):
    Last sector, +sectors or +size{K,M,G,T,P} (30410752-31457279, default 31457279):
     +256M
    
    Created a new partition 2 of type 'Linux' and of size 256 MiB.
    
    Command (m for help): t
    Partition number (1,2, default 2):
    Partition type (type L to list all types): 82
    
    Changed type of partition 'Linux' to 'Linux swap / Solaris'.
    
    Command (m for help): w
    The partition table has been altered.
    Calling ioctl() to re-read partition table.
    Syncing disks.
    
    rescue #
    

    verify using fdisk -l

    rescue # fdisk -l /dev/vda
    Disk /dev/vda: 15 GiB, 16106127360 bytes, 31457280 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    Disk identifier: 0x4cd40c9a
    
    Device     Boot    Start      End  Sectors  Size Id Type
    /dev/vda1           2048 30410751 30408704 14.5G 83 Linux
    /dev/vda2       30410752 30935039   524288  256M 82 Linux swap / Solaris
    

    (note we left a little wiggle room at the end of the disk - just to avoid the need to calculate exactly precise sizes)

    Thanked by 1FrankZ
  • Thanked by 1uptime
  • JabJabJabJab Member
    edited December 2019


    https://gopinkbuffalo.com/

    I heard @VirMach started another business.

    Thanked by 1uptime
  • uptimeuptime Member
    edited December 2019

    it occurs to me that resizing the filesystem may be unnecessary if you're just going to install a new OS on the /dev/vda1 partition anyway - but just in case you want to know how to preserve an existing filesystem, the procedure detailed above is how you would do that.

    @plumberg - let me know if any questions, and if the swap partition helps at all with your install from ISO on a 128 MB ram agenda.

    Also should note that you'll probably want to set swappiness to 0 or disable swap altogether after you're done with the install - so as not to run into problems with excessive disk i/o due to using the swap so much.

    Thanked by 2FrankZ plumberg
  • Thanked by 1uptime
  • Thanked by 1uptime
  • FAT32FAT32 Administrator, Deal Compiler Extraordinaire

    @VirMach Will there be any chances that we can still apply the flash deal code? Especially those big boys? :D

    Thanked by 1pullangcubo
  • If you like all the cellphone hacking they do on Mr. Robot, check out Termux for Android. Pretty nice way to script and hack from your phone in a pinch.

    Regarding swap for install, could you just swap to a file instead of making the partition, or is that not compatible with the installers?

    Thanked by 1uptime
  • Last exam before a break of one week in 1h15

  • uptimeuptime Member
    edited December 2019

    @randomq :+1: for termux I use it all day erryday

    I would be surprised if installers would do anything with a swap file - swap partition seems easy to find and identify as such, but an /etc/fstab entry in an unmounted filesystem maybe not so much ....

  • Thanked by 1uptime
  • randomqrandomq Member
    edited December 2019

    @uptime said:
    @randomq :+1: for termux I use it all day erryday

    I would be surprised if installers would do anything with a swap file - swap partition seems easy to find and identify as such, but an /etc/fstab entry in an unmounted filesystem maybe not so much ....

    You might be able to switch to another VT and mkswap, swapon a file at the right point in the install. It's been a while since I did a non kickstart/template/cloud install lol...

    ETA: though I did install alpine via netboot.xyz the other day, just to try out that functionality on a new kvm lite. I need to put a win10 iso out there and try that next...

    Thanked by 1uptime
  • I need to relax ....

    Thanked by 1uptime
Sign In or Register to comment.